| 10 | ) |
| 11 | |
| 12 | func TestNetworkOptLegacySyntax(t *testing.T) { |
| 13 | testCases := []struct { |
| 14 | value string |
| 15 | expected []NetworkAttachmentOpts |
| 16 | }{ |
| 17 | { |
| 18 | value: "docknet1", |
| 19 | expected: []NetworkAttachmentOpts{ |
| 20 | { |
| 21 | Target: "docknet1", |
| 22 | }, |
| 23 | }, |
| 24 | }, |
| 25 | } |
| 26 | for _, tc := range testCases { |
| 27 | var network NetworkOpt |
| 28 | assert.NilError(t, network.Set(tc.value)) |
| 29 | assert.Check(t, is.DeepEqual(tc.expected, network.Value(), cmpopts.EquateComparable(netip.Addr{}))) |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | func TestNetworkOptAdvancedSyntax(t *testing.T) { |
| 34 | testCases := []struct { |