Browse Source

Merge pull request #36476 from yongtang/03022018-kill_test

Remove unnecessary container.WithName in kill test
Sebastiaan van Stijn 7 years ago
parent
commit
e3814ece21
1 changed files with 2 additions and 4 deletions
  1. 2 4
      integration/container/kill_test.go

+ 2 - 4
integration/container/kill_test.go

@@ -155,8 +155,7 @@ func TestInspectOomKilledTrue(t *testing.T) {
 	ctx := context.Background()
 	ctx := context.Background()
 	client := request.NewAPIClient(t)
 	client := request.NewAPIClient(t)
 
 
-	name := "testoomkilled"
-	cID := container.Run(t, ctx, client, container.WithName(name), container.WithCmd("sh", "-c", "x=a; while true; do x=$x$x$x$x; done"), func(c *container.TestContainerConfig) {
+	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) {
 		c.HostConfig.Resources.Memory = 32 * 1024 * 1024
 		c.HostConfig.Resources.Memory = 32 * 1024 * 1024
 	})
 	})
 
 
@@ -174,8 +173,7 @@ func TestInspectOomKilledFalse(t *testing.T) {
 	ctx := context.Background()
 	ctx := context.Background()
 	client := request.NewAPIClient(t)
 	client := request.NewAPIClient(t)
 
 
-	name := "testoomkilled"
-	cID := container.Run(t, ctx, client, container.WithName(name), container.WithCmd("sh", "-c", "echo hello world"))
+	cID := container.Run(t, ctx, client, container.WithCmd("sh", "-c", "echo hello world"))
 
 
 	poll.WaitOn(t, container.IsInState(ctx, client, cID, "exited"), poll.WithDelay(100*time.Millisecond))
 	poll.WaitOn(t, container.IsInState(ctx, client, cID, "exited"), poll.WithDelay(100*time.Millisecond))