Browse Source

Move entrypoint build test to integration-cli

Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Alexandr Morozov 11 năm trước cách đây
mục cha
commit
b25a9b7138
2 tập tin đã thay đổi với 14 bổ sung16 xóa
  1. 14 0
      integration-cli/docker_cli_build_test.go
  2. 0 16
      integration/buildfile_test.go

+ 14 - 0
integration-cli/docker_cli_build_test.go

@@ -540,6 +540,20 @@ func TestBuildExpose(t *testing.T) {
 	logDone("build - expose")
 }
 
+func TestBuildEntrypoint(t *testing.T) {
+	checkSimpleBuild(t,
+		`
+        FROM scratch
+        ENTRYPOINT ["/bin/echo"]
+        `,
+		"testbuildimg",
+		"{{json .config.Entrypoint}}",
+		`["/bin/echo"]`)
+
+	deleteImages("testbuildimg")
+	logDone("build - entrypoint")
+}
+
 // TODO: TestCaching
 
 // TODO: TestADDCacheInvalidation

+ 0 - 16
integration/buildfile_test.go

@@ -414,22 +414,6 @@ func buildImage(context testContextTemplate, t *testing.T, eng *engine.Engine, u
 	return image, err
 }
 
-func TestBuildEntrypoint(t *testing.T) {
-	img, err := buildImage(testContextTemplate{`
-        from {IMAGE}
-        entrypoint ["/bin/echo"]
-        `,
-		nil, nil}, t, nil, true)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	if img.Config.Entrypoint[0] != "/bin/echo" {
-		t.Log(img.Config.Entrypoint[0])
-		t.Fail()
-	}
-}
-
 // testing #1405 - config.Cmd does not get cleaned up if
 // utilizing cache
 func TestBuildEntrypointRunCleanup(t *testing.T) {