Skip to content

Commit c530c9c

Browse files
author
vikrambirsingh
committed
TestRunAttachFailedNoLeak: Compare lowercase
Fixed failures in TestRunAttachFailedNoLeak caused by case mismatch Signed-off-by: vikrambirsingh <[email protected]>
1 parent 8840071 commit c530c9c

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

integration-cli/docker_cli_run_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3945,11 +3945,12 @@ func (s *DockerSuite) TestRunAttachFailedNoLeak(c *testing.T) {
39453945
assert.Assert(c, err != nil, "Command should have failed but succeeded with: %s\nContainer 'test' [%+v]: %s\nContainer 'fail' [%+v]: %s", out, err1, out1, err2, out2)
39463946
// check for windows error as well
39473947
// TODO Windows Post TP5. Fix the error message string
3948-
assert.Assert(c, strings.Contains(out, "port is already allocated") ||
3949-
strings.Contains(out, "were not connected because a duplicate name exists") ||
3950-
strings.Contains(out, "The specified port already exists") ||
3951-
strings.Contains(out, "HNS failed with error : Failed to create endpoint") ||
3952-
strings.Contains(out, "HNS failed with error : The object already exists"), fmt.Sprintf("Output: %s", out))
3948+
outLowerCase := strings.ToLower(out)
3949+
assert.Assert(c, strings.Contains(outLowerCase, "port is already allocated") ||
3950+
strings.Contains(outLowerCase, "were not connected because a duplicate name exists") ||
3951+
strings.Contains(outLowerCase, "the specified port already exists") ||
3952+
strings.Contains(outLowerCase, "hns failed with error : failed to create endpoint") ||
3953+
strings.Contains(outLowerCase, "hns failed with error : the object already exists"), fmt.Sprintf("Output: %s", out))
39533954
dockerCmd(c, "rm", "-f", "test")
39543955

39553956
// NGoroutines is not updated right away, so we need to wait before failing

0 commit comments

Comments
 (0)