mirror of
https://github.com/docker/compose.git
synced 2025-04-08 17:05:13 +02:00
cli.options: Do not test port list order
Signed-off-by: Chris Crone <christopher.crone@docker.com>
This commit is contained in:
parent
544f24f3dd
commit
0e92fd21d0
@ -21,6 +21,7 @@ import (
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp/cmpopts"
|
||||
"gotest.tools/v3/assert"
|
||||
"gotest.tools/v3/assert/cmp"
|
||||
|
||||
@ -121,7 +122,9 @@ func TestPortParse(t *testing.T) {
|
||||
}
|
||||
result, err := opts.toPorts()
|
||||
assert.NilError(t, err)
|
||||
assert.DeepEqual(t, result, testCase.expected)
|
||||
assert.DeepEqual(t, result, testCase.expected, cmpopts.SortSlices(func(x, y containers.Port) bool {
|
||||
return x.ContainerPort < y.ContainerPort
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user