switch tests back to '_' separator for networks and volumes

Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
This commit is contained in:
Guillaume Lours 2022-08-01 17:25:43 +02:00
parent bff44ff466
commit 052469104f
No known key found for this signature in database
3 changed files with 7 additions and 7 deletions

View File

@ -49,7 +49,7 @@ func TestLocalComposeUp(t *testing.T) {
assert.Assert(t, strings.Contains(output, `"word":`))
res = c.RunDockerCmd(t, "network", "ls")
res.Assert(t, icmd.Expected{Out: projectName + "-default"})
res.Assert(t, icmd.Expected{Out: projectName + "_default"})
})
t.Run("top", func(t *testing.T) {
@ -74,7 +74,7 @@ func TestLocalComposeUp(t *testing.T) {
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.service": "web"`})
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.version":`})
res = c.RunDockerCmd(t, "network", "inspect", projectName+"-default")
res = c.RunDockerCmd(t, "network", "inspect", projectName+"_default")
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.network": "default"`})
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.project": `})
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.version": `})
@ -241,6 +241,6 @@ func TestConvert(t *testing.T) {
default: null
networks:
default:
name: compose-e2e-convert-default`, filepath.Join(wd, "fixtures", "simple-build-test", "nginx-build")), ExitCode: 0})
name: compose-e2e-convert_default`, filepath.Join(wd, "fixtures", "simple-build-test", "nginx-build")), ExitCode: 0})
})
}

View File

@ -52,7 +52,7 @@ func TestNetworks(t *testing.T) {
assert.Assert(t, strings.Contains(output, `"word":`))
res = c.RunDockerCmd(t, "network", "ls")
res.Assert(t, icmd.Expected{Out: projectName + "-dbnet"})
res.Assert(t, icmd.Expected{Out: projectName + "_dbnet"})
res.Assert(t, icmd.Expected{Out: "microservices"})
})
@ -126,7 +126,7 @@ func TestIPAMConfig(t *testing.T) {
const projectName = "ipam_e2e"
t.Run("ensure we do not reuse previous networks", func(t *testing.T) {
c.RunDockerOrExitError(t, "network", "rm", projectName+"-default")
c.RunDockerOrExitError(t, "network", "rm", projectName+"_default")
})
t.Run("up", func(t *testing.T) {
@ -135,7 +135,7 @@ func TestIPAMConfig(t *testing.T) {
t.Run("ensure service get fixed IP assigned", func(t *testing.T) {
res := c.RunDockerCmd(t, "inspect", projectName+"-foo-1", "-f",
fmt.Sprintf(`{{ $network := index .NetworkSettings.Networks "%s-default" }}{{ $network.IPAMConfig.IPv4Address }}`, projectName))
fmt.Sprintf(`{{ $network := index .NetworkSettings.Networks "%s_default" }}{{ $network.IPAMConfig.IPv4Address }}`, projectName))
res.Assert(t, icmd.Expected{Out: "10.1.0.100"})
})

View File

@ -107,7 +107,7 @@ func TestProjectVolumeBind(t *testing.T) {
c.RunDockerComposeCmd(t, "--project-name", projectName, "down")
c.RunDockerOrExitError(t, "volume", "rm", "-f", projectName+"-project-data").Assert(t, icmd.Success)
c.RunDockerOrExitError(t, "volume", "rm", "-f", projectName+"_project-data").Assert(t, icmd.Success)
cmd := c.NewCmdWithEnv([]string{"TEST_DIR=" + tmpDir},
"docker", "compose", "--project-directory", "fixtures/project-volume-bind-test", "--project-name", projectName, "up", "-d")
icmd.RunCmd(cmd).Assert(t, icmd.Success)