Browse code

Move entrypoint build test to integration-cli

Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)

Alexandr Morozov authored on 2014/05/27 13:36:00
Showing 2 changed files
... ...
@@ -540,6 +540,20 @@ func TestBuildExpose(t *testing.T) {
540 540
 	logDone("build - expose")
541 541
 }
542 542
 
543
+func TestBuildEntrypoint(t *testing.T) {
544
+	checkSimpleBuild(t,
545
+		`
546
+        FROM scratch
547
+        ENTRYPOINT ["/bin/echo"]
548
+        `,
549
+		"testbuildimg",
550
+		"{{json .config.Entrypoint}}",
551
+		`["/bin/echo"]`)
552
+
553
+	deleteImages("testbuildimg")
554
+	logDone("build - entrypoint")
555
+}
556
+
543 557
 // TODO: TestCaching
544 558
 
545 559
 // TODO: TestADDCacheInvalidation
... ...
@@ -414,22 +414,6 @@ func buildImage(context testContextTemplate, t *testing.T, eng *engine.Engine, u
414 414
 	return image, err
415 415
 }
416 416
 
417
-func TestBuildEntrypoint(t *testing.T) {
418
-	img, err := buildImage(testContextTemplate{`
419
-        from {IMAGE}
420
-        entrypoint ["/bin/echo"]
421
-        `,
422
-		nil, nil}, t, nil, true)
423
-	if err != nil {
424
-		t.Fatal(err)
425
-	}
426
-
427
-	if img.Config.Entrypoint[0] != "/bin/echo" {
428
-		t.Log(img.Config.Entrypoint[0])
429
-		t.Fail()
430
-	}
431
-}
432
-
433 417
 // testing #1405 - config.Cmd does not get cleaned up if
434 418
 // utilizing cache
435 419
 func TestBuildEntrypointRunCleanup(t *testing.T) {