mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fix assertPortList normalizing being too strict
The normalizing was updated with the output of the "docker port" command in mind, but we're normalizing the "expected" output, which is passed without the "->" in front of the mapping, causing some tests to fail; === RUN TestDockerSuite/TestPortHostBinding --- FAIL: TestDockerSuite/TestPortHostBinding (1.21s) docker_cli_port_test.go:324: assertion failed: error is not nil: |:::9876!=[::]:9876| === RUN TestDockerSuite/TestPortList --- FAIL: TestDockerSuite/TestPortList (0.96s) docker_cli_port_test.go:25: assertion failed: error is not nil: |:::9876!=[::]:9876| Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
797b974cb9
commit
c8599a6537
1 changed files with 1 additions and 1 deletions
|
@ -161,7 +161,7 @@ func assertPortList(c *testing.T, out string, expected []string) error {
|
|||
// of the CLI used an incorrect output format for mappings on IPv6 addresses
|
||||
// for example, "80/tcp -> :::80" instead of "80/tcp -> [::]:80".
|
||||
oldFormat := func(mapping string) string {
|
||||
old := strings.Replace(mapping, "-> [", "-> ", 1)
|
||||
old := strings.Replace(mapping, "[", "", 1)
|
||||
old = strings.Replace(old, "]:", ":", 1)
|
||||
return old
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue