Adapt tests to use absolute paths

- This also includes IDE linter formating

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
Ulysses Souza 2021-01-30 17:31:56 -03:00
parent a3e81be6ea
commit bf17797070
1 changed files with 7 additions and 6 deletions

View File

@ -66,12 +66,13 @@ func TestLocalComposeUp(t *testing.T) {
})
t.Run("check compose labels", func(t *testing.T) {
wd, _ := os.Getwd()
res := c.RunDockerCmd("inspect", projectName+"_web_1")
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.container-number": "1"`})
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.project": "compose-e2e-demo"`})
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.oneoff": "False",`})
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.config-hash":`})
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.project.config_files": "./fixtures/sentences/compose.yaml"`})
res.Assert(t, icmd.Expected{Out: fmt.Sprintf(`"com.docker.compose.project.config_files": "%s/fixtures/sentences/compose.yaml"`, wd)})
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.project.working_dir":`})
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.service": "web"`})
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.version":`})