Example #1
0
func TestDefaultNetworkName(t *testing.T) {
	networks := manifest.Networks{}

	s := manifest.Service{
		Networks: networks,
	}

	assert.Equal(t, s.NetworkName(), "")
}
Example #2
0
func TestNetworkName(t *testing.T) {
	networks := manifest.Networks{
		"foo": manifest.InternalNetwork{
			"external": manifest.ExternalNetwork{
				Name: "foonet",
			},
		},
	}

	s := manifest.Service{
		Networks: networks,
	}

	assert.Equal(t, s.NetworkName(), "foonet")
}