Browse code

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 <ahmetalpbalkan@gmail.com>

Ahmet Alp Balkan authored on 2015/02/25 17:04:46
Showing 1 changed files
... ...
@@ -253,6 +253,7 @@ func TestCommitChange(t *testing.T) {
253 253
 		"--change", "EXPOSE 8080",
254 254
 		"--change", "ENV DEBUG true",
255 255
 		"--change", "ENV test 1",
256
+		"--change", "ENV PATH /foo",
256 257
 		"test", "test-commit")
257 258
 	imageId, _, err := runCommandWithOutput(cmd)
258 259
 	if err != nil {
... ...
@@ -263,7 +264,7 @@ func TestCommitChange(t *testing.T) {
263 263
 
264 264
 	expected := map[string]string{
265 265
 		"Config.ExposedPorts": "map[8080/tcp:map[]]",
266
-		"Config.Env":          "[DEBUG=true test=1]",
266
+		"Config.Env":          "[DEBUG=true test=1 PATH=/foo]",
267 267
 	}
268 268
 
269 269
 	for conf, value := range expected {