Browse code

integration-cli: Enable TestExecStartFails on Windows

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>

Paweł Gronowski authored on 2023/03/13 21:57:34
Showing 1 changed files
... ...
@@ -509,16 +509,18 @@ func (s *DockerCLIExecSuite) TestExecUlimits(c *testing.T) {
509 509
 
510 510
 // #15750
511 511
 func (s *DockerCLIExecSuite) TestExecStartFails(c *testing.T) {
512
-	// TODO Windows CI. This test should be portable. Figure out why it fails
513
-	// currently.
514
-	testRequires(c, DaemonIsLinux)
515 512
 	name := "exec-15750"
516 513
 	runSleepingContainer(c, "-d", "--name", name)
517 514
 	assert.NilError(c, waitRun(name))
518 515
 
519 516
 	out, _, err := dockerCmdWithError("exec", name, "no-such-cmd")
520 517
 	assert.ErrorContains(c, err, "", out)
521
-	assert.Assert(c, strings.Contains(out, "executable file not found"))
518
+
519
+	expectedMsg := "executable file not found"
520
+	if DaemonIsWindows() {
521
+		expectedMsg = "The system cannot find the file specified"
522
+	}
523
+	assert.Assert(c, is.Contains(out, expectedMsg))
522 524
 }
523 525
 
524 526
 // Fix regression in https://github.com/docker/docker/pull/26461#issuecomment-250287297