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

Function TestInterfaceName

pkg/e2e/networks_test.go:185–201  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

183}
184
185func TestInterfaceName(t *testing.T) {
186 c := NewCLI(t)
187
188 version := c.RunDockerCmd(t, "version", "-f", "{{.Server.Version}}")
189 major, _, found := strings.Cut(version.Combined(), ".")
190 assert.Assert(t, found)
191 if major == "26" || major == "27" {
192 t.Skip("Skipping test due to docker version < 28")
193 }
194
195 const projectName = "network_interface_name"
196 res := c.RunDockerComposeCmd(t, "-f", "./fixtures/network-interface-name/compose.yaml", "--project-name", projectName, "run", "test")
197 t.Cleanup(func() {
198 c.cleanupWithDown(t, projectName)
199 })
200 res.Assert(t, icmd.Expected{Out: "foobar@"})
201}
202
203func TestNetworkRecreate(t *testing.T) {
204 c := NewCLI(t)

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected