Fixed failures in TestRunAttachFailedNoLeak caused by case mismatch
Signed-off-by: vikrambirsingh <vikrambir.singh@docker.com>
| ... | ... |
@@ -3945,11 +3945,12 @@ func (s *DockerSuite) TestRunAttachFailedNoLeak(c *testing.T) {
|
| 3945 | 3945 |
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) |
| 3946 | 3946 |
// check for windows error as well |
| 3947 | 3947 |
// 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))
|
|
| 3953 | 3954 |
dockerCmd(c, "rm", "-f", "test") |
| 3954 | 3955 |
|
| 3955 | 3956 |
// NGoroutines is not updated right away, so we need to wait before failing |