From 576416c99a0ae8ad27467f217ec21f598e4f4cc8 Mon Sep 17 00:00:00 2001 From: Erik Hollensbe Date: Wed, 3 Sep 2014 12:17:17 -0700 Subject: [PATCH] move entrypoint integration-cli test for blank entrypoint to separate function Docker-DCO-1.1-Signed-off-by: Erik Hollensbe (github: erikh) --- integration-cli/docker_cli_build_test.go | 25 ++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/integration-cli/docker_cli_build_test.go b/integration-cli/docker_cli_build_test.go index 6860abf453..58d99a7d6b 100644 --- a/integration-cli/docker_cli_build_test.go +++ b/integration-cli/docker_cli_build_test.go @@ -773,13 +773,14 @@ func TestBuildExpose(t *testing.T) { logDone("build - expose") } -func TestBuildEntrypoint(t *testing.T) { +func TestBuildEmptyEntrypoint(t *testing.T) { name := "testbuildentrypoint" - expected := "[/bin/echo]" defer deleteImages(name) + expected := "[]" + _, err := buildImage(name, - `FROM scratch - ENTRYPOINT ["/bin/echo"]`, + `FROM busybox + ENTRYPOINT []`, true) if err != nil { t.Fatal(err) @@ -792,17 +793,21 @@ func TestBuildEntrypoint(t *testing.T) { t.Fatalf("Entrypoint %s, expected %s", res, expected) } - deleteImages(name) - expected = "[]" + logDone("build - empty entrypoint") +} - _, err = buildImage(name, - `FROM busybox - ENTRYPOINT []`, +func TestBuildEntrypoint(t *testing.T) { + name := "testbuildentrypoint" + expected := "[/bin/echo]" + defer deleteImages(name) + _, err := buildImage(name, + `FROM scratch + ENTRYPOINT ["/bin/echo"]`, true) if err != nil { t.Fatal(err) } - res, err = inspectField(name, "Config.Entrypoint") + res, err := inspectField(name, "Config.Entrypoint") if err != nil { t.Fatal(err) }