MCPcopy
hub / github.com/moby/moby / createTestNetwork

Function createTestNetwork

daemon/libnetwork/libnetwork_linux_test.go:62–66  ·  view source on GitHub ↗
(c *libnetwork.Controller, networkType, networkName string, netOption options.Generic, ipamV4Configs, ipamV6Configs []*libnetwork.IpamConf)

Source from the content-addressed store, hash-verified

60}
61
62func createTestNetwork(c *libnetwork.Controller, networkType, networkName string, netOption options.Generic, ipamV4Configs, ipamV6Configs []*libnetwork.IpamConf) (*libnetwork.Network, error) {
63 return c.NewNetwork(context.Background(), networkType, networkName, "",
64 libnetwork.NetworkOptionGeneric(netOption),
65 libnetwork.NetworkOptionIpam(defaultipam.DriverName, "", ipamV4Configs, ipamV6Configs, nil))
66}
67
68func getEmptyGenericOption() map[string]any {
69 return map[string]any{netlabel.GenericData: map[string]string{}}

Callers 15

TestNullFunction · 0.85
TestUnknownDriverFunction · 0.85
TestNetworkNameFunction · 0.85
TestNetworkTypeFunction · 0.85
TestNetworkIDFunction · 0.85
TestUnknownNetworkFunction · 0.85
TestUnknownEndpointFunction · 0.85
TestDuplicateEndpointFunction · 0.85
TestControllerQueryFunction · 0.85
TestNetworkQueryFunction · 0.85

Calls 3

NetworkOptionGenericFunction · 0.92
NetworkOptionIpamFunction · 0.92
NewNetworkMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…