(t *testing.T)
| 291 | } |
| 292 | |
| 293 | func TestConvertServiceNetworksCustomDefault(t *testing.T) { |
| 294 | networkConfigs := networkMap{ |
| 295 | "default": composetypes.NetworkConfig{ |
| 296 | External: composetypes.External{External: true}, |
| 297 | Name: "custom", |
| 298 | }, |
| 299 | } |
| 300 | networks := map[string]*composetypes.ServiceNetworkConfig{} |
| 301 | |
| 302 | configs, err := convertServiceNetworks( |
| 303 | networks, networkConfigs, NewNamespace("foo"), "service") |
| 304 | |
| 305 | expected := []swarm.NetworkAttachmentConfig{ |
| 306 | { |
| 307 | Target: "custom", |
| 308 | Aliases: []string{"service"}, |
| 309 | }, |
| 310 | } |
| 311 | |
| 312 | assert.NilError(t, err) |
| 313 | assert.Check(t, is.DeepEqual(expected, configs)) |
| 314 | } |
| 315 | |
| 316 | func TestConvertDNSConfigEmpty(t *testing.T) { |
| 317 | dnsConfig := convertDNSConfig(nil, nil) |
nothing calls this directly
no test coverage detected
searching dependent graphs…