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> Upstream-commit: c1b7792186c2408817e5027fdc1c2e4fa355dcf4 Component: engine
This commit is contained in:
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user