MCPcopy Index your code
hub / github.com/docker/cli / TestNetworkOptLegacySyntax

Function TestNetworkOptLegacySyntax

opts/network_test.go:12–31  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func 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
33func TestNetworkOptAdvancedSyntax(t *testing.T) {
34 testCases := []struct {

Callers

nothing calls this directly

Calls 2

SetMethod · 0.95
ValueMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…