diff options
author | Paweł Gronowski <pawel.gronowski@docker.com> | 2023-03-13 13:57:34 +0100 |
---|---|---|
committer | Paweł Gronowski <pawel.gronowski@docker.com> | 2023-03-28 11:10:24 +0200 |
commit | f3946c14fef1991cfbb86b2a480136707328b08b (patch) | |
tree | 3c05b634a760037b16433d81f461ea935661ff4b | |
parent | 219f21bf07502b447095649b5a2764661737f164 (diff) | |
download | docker-f3946c14fef1991cfbb86b2a480136707328b08b.tar.gz |
integration-cli: Enable TestExecStartFails on Windows
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit be34e93f2018e121a5539b5f8b830615c2347fc2)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
-rw-r--r-- | integration-cli/docker_cli_exec_test.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/integration-cli/docker_cli_exec_test.go b/integration-cli/docker_cli_exec_test.go index 2dc1ad942c..b7cfb10d52 100644 --- a/integration-cli/docker_cli_exec_test.go +++ b/integration-cli/docker_cli_exec_test.go @@ -509,16 +509,18 @@ func (s *DockerCLIExecSuite) TestExecUlimits(c *testing.T) { // #15750 func (s *DockerCLIExecSuite) TestExecStartFails(c *testing.T) { - // TODO Windows CI. This test should be portable. Figure out why it fails - // currently. - testRequires(c, DaemonIsLinux) name := "exec-15750" runSleepingContainer(c, "-d", "--name", name) assert.NilError(c, waitRun(name)) out, _, err := dockerCmdWithError("exec", name, "no-such-cmd") assert.ErrorContains(c, err, "", out) - assert.Assert(c, strings.Contains(out, "executable file not found")) + + expectedMsg := "executable file not found" + if DaemonIsWindows() { + expectedMsg = "The system cannot find the file specified" + } + assert.Assert(c, is.Contains(out, expectedMsg)) } // Fix regression in https://github.com/docker/docker/pull/26461#issuecomment-250287297 |