mirror of https://github.com/docker/cli.git
Minor touch-ups in network-option tests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
c4844b1fdd
commit
a88d17c2a4
|
@ -28,7 +28,7 @@ func TestNetworkOptLegacySyntax(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestNetworkOptCompleteSyntax(t *testing.T) {
|
||||
func TestNetworkOptAdvancedSyntax(t *testing.T) {
|
||||
testCases := []struct {
|
||||
value string
|
||||
expected []NetworkAttachmentOpts
|
||||
|
@ -69,13 +69,15 @@ func TestNetworkOptCompleteSyntax(t *testing.T) {
|
|||
},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.value, func(t *testing.T) {
|
||||
var network NetworkOpt
|
||||
assert.NilError(t, network.Set(tc.value))
|
||||
assert.Check(t, is.DeepEqual(tc.expected, network.Value()))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestNetworkOptInvalidSyntax(t *testing.T) {
|
||||
func TestNetworkOptAdvancedSyntaxInvalid(t *testing.T) {
|
||||
testCases := []struct {
|
||||
value string
|
||||
expectedError string
|
||||
|
@ -94,7 +96,9 @@ func TestNetworkOptInvalidSyntax(t *testing.T) {
|
|||
},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.value, func(t *testing.T) {
|
||||
var network NetworkOpt
|
||||
assert.ErrorContains(t, network.Set(tc.value), tc.expectedError)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue