Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 6ad4cf7

Browse files
vikrambirsinghthaJeztah
authored andcommitted
TestRunAttachFailedNoLeak: Compare lowercase
Fixed failures in TestRunAttachFailedNoLeak caused by case mismatch Signed-off-by: vikrambirsingh <vikrambir.singh@docker.com> (cherry picked from commit c530c9cbb0da177337a90a6651305daa9eb0c42b) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 5302429fffd4a1971e11c867e32a6a19b7b66919 Component: engine
1 parent a44ab05 commit 6ad4cf7

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

components/engine/integration-cli/docker_cli_run_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3944,11 +3944,12 @@ func (s *DockerSuite) TestRunAttachFailedNoLeak(c *testing.T) {
39443944
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)
39453945
// check for windows error as well
39463946
// TODO Windows Post TP5. Fix the error message string
3947-
assert.Assert(c, strings.Contains(out, "port is already allocated") ||
3948-
strings.Contains(out, "were not connected because a duplicate name exists") ||
3949-
strings.Contains(out, "The specified port already exists") ||
3950-
strings.Contains(out, "HNS failed with error : Failed to create endpoint") ||
3951-
strings.Contains(out, "HNS failed with error : The object already exists"), fmt.Sprintf("Output: %s", out))
3947+
outLowerCase := strings.ToLower(out)
3948+
assert.Assert(c, strings.Contains(outLowerCase, "port is already allocated") ||
3949+
strings.Contains(outLowerCase, "were not connected because a duplicate name exists") ||
3950+
strings.Contains(outLowerCase, "the specified port already exists") ||
3951+
strings.Contains(outLowerCase, "hns failed with error : failed to create endpoint") ||
3952+
strings.Contains(outLowerCase, "hns failed with error : the object already exists"), fmt.Sprintf("Output: %s", out))
39523953
dockerCmd(c, "rm", "-f", "test")
39533954

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

0 commit comments

Comments
 (0)