MCPcopy
hub / github.com/docker/compose / TestPrepareNetworkLabels

Function TestPrepareNetworkLabels

pkg/compose/create_test.go:93–104  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

91}
92
93func TestPrepareNetworkLabels(t *testing.T) {
94 project := composetypes.Project{
95 Name: "myProject",
96 Networks: composetypes.Networks(map[string]composetypes.NetworkConfig{"skynet": {}}),
97 }
98 prepareNetworks(&project)
99 assert.DeepEqual(t, project.Networks["skynet"].CustomLabels, composetypes.Labels(map[string]string{
100 "com.docker.compose.network": "skynet",
101 "com.docker.compose.project": "myProject",
102 "com.docker.compose.version": api.ComposeVersion,
103 }))
104}
105
106func TestBuildContainerMountOptions(t *testing.T) {
107 project := composetypes.Project{

Callers

nothing calls this directly

Calls 3

prepareNetworksFunction · 0.85
NetworksMethod · 0.80
LabelsMethod · 0.80

Tested by

no test coverage detected