Fix bug with docker compatibility

ArgsEscaped according to Docker docs should only be set in Windows
environments: https://docs.docker.com/engine/api/v1.30/

It was causing integration test to fail with following message:
```
FAIL: TestRun/test_Dockerfile_test_metadata (8.48s)
           "Diff": {
             "Adds": [
               "ArgsEscaped: true"
             ],
             "Dels": [
               "ArgsEscaped: false"
             ]
```

However docker 18.xx returns ArgsEscaped: true
whereas docker 19.xx returns ArgsEscaped: false
Hence this patch also adds the docker version check to the integration
to ignore ArgsEscaped being different when 18.xx is used.
This commit is contained in:
Sam Stoelinga
2020-01-13 21:18:54 -08:00
parent aecc915e03
commit 64bfc3eabb
4 changed files with 94 additions and 19 deletions
+2 -1
View File
@@ -49,7 +49,8 @@ func (c *CmdCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.Bui
}
config.Cmd = newCommand
config.ArgsEscaped = true
// ArgsEscaped is only used in windows environments
config.ArgsEscaped = false
return nil
}