@@ -18,7 +18,7 @@ func TestKillContainerInvalidSignal(t *testing.T) {
1818 defer setupTest (t )()
1919 client := testEnv .APIClient ()
2020 ctx := context .Background ()
21- id := container .Run (t , ctx , client )
21+ id := container .Run (ctx , t , client )
2222
2323 err := client .ContainerKill (ctx , id , "0" )
2424 assert .Error (t , err , "Error response from daemon: Invalid signal: 0" )
@@ -60,7 +60,7 @@ func TestKillContainer(t *testing.T) {
6060 tc := tc
6161 t .Run (tc .doc , func (t * testing.T ) {
6262 ctx := context .Background ()
63- id := container .Run (t , ctx , client )
63+ id := container .Run (ctx , t , client )
6464 err := client .ContainerKill (ctx , id , tc .signal )
6565 assert .NilError (t , err )
6666
@@ -95,7 +95,7 @@ func TestKillWithStopSignalAndRestartPolicies(t *testing.T) {
9595 tc := tc
9696 t .Run (tc .doc , func (t * testing.T ) {
9797 ctx := context .Background ()
98- id := container .Run (t , ctx , client ,
98+ id := container .Run (ctx , t , client ,
9999 container .WithRestartPolicy ("always" ),
100100 func (c * container.TestContainerConfig ) {
101101 c .Config .StopSignal = tc .stopsignal
@@ -137,7 +137,7 @@ func TestKillDifferentUserContainer(t *testing.T) {
137137 ctx := context .Background ()
138138 client := request .NewAPIClient (t , client .WithVersion ("1.19" ))
139139
140- id := container .Run (t , ctx , client , func (c * container.TestContainerConfig ) {
140+ id := container .Run (ctx , t , client , func (c * container.TestContainerConfig ) {
141141 c .Config .User = "daemon"
142142 })
143143 poll .WaitOn (t , container .IsInState (ctx , client , id , "running" ), poll .WithDelay (100 * time .Millisecond ))
@@ -154,7 +154,7 @@ func TestInspectOomKilledTrue(t *testing.T) {
154154 ctx := context .Background ()
155155 client := testEnv .APIClient ()
156156
157- cID := container .Run (t , ctx , client , container .WithCmd ("sh" , "-c" , "x=a; while true; do x=$x$x$x$x; done" ), func (c * container.TestContainerConfig ) {
157+ cID := container .Run (ctx , t , client , container .WithCmd ("sh" , "-c" , "x=a; while true; do x=$x$x$x$x; done" ), func (c * container.TestContainerConfig ) {
158158 c .HostConfig .Resources .Memory = 32 * 1024 * 1024
159159 })
160160
@@ -172,7 +172,7 @@ func TestInspectOomKilledFalse(t *testing.T) {
172172 ctx := context .Background ()
173173 client := testEnv .APIClient ()
174174
175- cID := container .Run (t , ctx , client , container .WithCmd ("sh" , "-c" , "echo hello world" ))
175+ cID := container .Run (ctx , t , client , container .WithCmd ("sh" , "-c" , "echo hello world" ))
176176
177177 poll .WaitOn (t , container .IsInState (ctx , client , cID , "exited" ), poll .WithDelay (100 * time .Millisecond ))
178178
0 commit comments