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

Function TestMacAddress

pkg/e2e/networks_test.go:174–183  ·  pkg/e2e/networks_test.go::TestMacAddress
(t *testing.T)

Source from the content-addressed store, hash-verified

172}
173
174func TestMacAddress(t *testing.T) {
175 c := NewCLI(t)
176 const projectName = "network_mac_address"
177 c.RunDockerComposeCmd(t, "-f", "./fixtures/network-test/mac_address.yaml", "--project-name", projectName, "up", "-d")
178 t.Cleanup(func() {
179 c.cleanupWithDown(t, projectName)
180 })
181 res := c.RunDockerCmd(t, "inspect", fmt.Sprintf("%s-test-1", projectName), "-f", "{{ (index .NetworkSettings.Networks \"network_mac_address_default\" ).MacAddress }}")
182 res.Assert(t, icmd.Expected{Out: "00:e0:84:35:d0:e8"})
183}
184
185func TestInterfaceName(t *testing.T) {
186 c := NewCLI(t)

Callers

nothing calls this directly

Calls 4

RunDockerComposeCmdMethod · 0.95
cleanupWithDownMethod · 0.95
RunDockerCmdMethod · 0.95
NewCLIFunction · 0.85

Tested by

no test coverage detected