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

Function TestConvertServiceNetworksOnlyDefault

cli/compose/convert/service_test.go:233–248  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

231}
232
233func TestConvertServiceNetworksOnlyDefault(t *testing.T) {
234 networkConfigs := networkMap{}
235
236 configs, err := convertServiceNetworks(
237 nil, networkConfigs, NewNamespace("foo"), "service")
238
239 expected := []swarm.NetworkAttachmentConfig{
240 {
241 Target: "foo_default",
242 Aliases: []string{"service"},
243 },
244 }
245
246 assert.NilError(t, err)
247 assert.Check(t, is.DeepEqual(expected, configs))
248}
249
250func TestConvertServiceNetworks(t *testing.T) {
251 networkConfigs := networkMap{

Callers

nothing calls this directly

Calls 2

convertServiceNetworksFunction · 0.85
NewNamespaceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…