@@ -17,7 +17,7 @@ import (
1717
1818func TestKillContainerInvalidSignal (t * testing.T ) {
1919 defer setupTest (t )()
20- client := request . NewAPIClient ( t )
20+ client := testEnv . APIClient ( )
2121 ctx := context .Background ()
2222 id := container .Run (t , ctx , client )
2323
@@ -33,7 +33,7 @@ func TestKillContainerInvalidSignal(t *testing.T) {
3333func TestKillContainer (t * testing.T ) {
3434 skip .If (t , testEnv .OSType == "windows" , "TODO Windows: FIXME. No SIGWINCH" )
3535 defer setupTest (t )()
36- client := request . NewAPIClient ( t )
36+ client := testEnv . APIClient ( )
3737
3838 testCases := []struct {
3939 doc string
@@ -73,7 +73,7 @@ func TestKillContainer(t *testing.T) {
7373func TestKillWithStopSignalAndRestartPolicies (t * testing.T ) {
7474 skip .If (t , testEnv .OSType == "windows" , "Windows only supports 1.25 or later" )
7575 defer setupTest (t )()
76- client := request . NewAPIClient ( t )
76+ client := testEnv . APIClient ( )
7777
7878 testCases := []struct {
7979 doc string
@@ -114,7 +114,7 @@ func TestKillStoppedContainer(t *testing.T) {
114114 skip .If (t , testEnv .OSType == "windows" , "Windows only supports 1.25 or later" )
115115 defer setupTest (t )()
116116 ctx := context .Background ()
117- client := request . NewAPIClient ( t )
117+ client := testEnv . APIClient ( )
118118 id := container .Create (t , ctx , client )
119119 err := client .ContainerKill (ctx , id , "SIGKILL" )
120120 assert .Assert (t , is .ErrorContains (err , "" ))
@@ -154,7 +154,7 @@ func TestInspectOomKilledTrue(t *testing.T) {
154154
155155 defer setupTest (t )()
156156 ctx := context .Background ()
157- client := request . NewAPIClient ( t )
157+ client := testEnv . APIClient ( )
158158
159159 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 ) {
160160 c .HostConfig .Resources .Memory = 32 * 1024 * 1024
@@ -172,7 +172,7 @@ func TestInspectOomKilledFalse(t *testing.T) {
172172
173173 defer setupTest (t )()
174174 ctx := context .Background ()
175- client := request . NewAPIClient ( t )
175+ client := testEnv . APIClient ( )
176176
177177 cID := container .Run (t , ctx , client , container .WithCmd ("sh" , "-c" , "echo hello world" ))
178178
0 commit comments