From c1b7792186c2408817e5027fdc1c2e4fa355dcf4 Mon Sep 17 00:00:00 2001 From: Ahmet Alp Balkan Date: Wed, 25 Feb 2015 00:04:46 -0800 Subject: [PATCH] integ-cli: fix TestCommitChange for pulled busybox If the tests are running outside a container (i.e. executed without `make test`), we are using a `busybox` pulled from Docker Hub (not jpatezzo's docker-busybox). That one adds an extra `PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin` env var all the time and that messes the test `TestCommitChange`. That's currently breaking the windows CI. I'm keeping the same PATH here but making it explicit so that it's always set and we verify what we set. It's actually the same thing if I set `ENV PATH foo` here but I thought it may lead to some problems hard to debug in the future. Signed-off-by: Ahmet Alp Balkan --- integration-cli/docker_cli_commit_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integration-cli/docker_cli_commit_test.go b/integration-cli/docker_cli_commit_test.go index 58e8ae2d7e..8d596bdda1 100644 --- a/integration-cli/docker_cli_commit_test.go +++ b/integration-cli/docker_cli_commit_test.go @@ -253,6 +253,7 @@ func TestCommitChange(t *testing.T) { "--change", "EXPOSE 8080", "--change", "ENV DEBUG true", "--change", "ENV test 1", + "--change", "ENV PATH /foo", "test", "test-commit") imageId, _, err := runCommandWithOutput(cmd) if err != nil { @@ -263,7 +264,7 @@ func TestCommitChange(t *testing.T) { expected := map[string]string{ "Config.ExposedPorts": "map[8080/tcp:map[]]", - "Config.Env": "[DEBUG=true test=1]", + "Config.Env": "[DEBUG=true test=1 PATH=/foo]", } for conf, value := range expected {