only check if a dependency is required when something unexpected happens

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
Guillaume Lours 2023-07-18 18:24:55 +02:00
parent bb94ea034e
commit 2d16a05afa
No known key found for this signature in database
2 changed files with 27 additions and 5 deletions

View file

@ -162,7 +162,7 @@ func TestUpWithDependencyNotRequired(t *testing.T) {
})
res := c.RunDockerComposeCmd(t, "-f", "./fixtures/dependencies/deps-not-required.yaml", "--project-name", projectName,
"up", "-d")
"--profile", "not-required", "up", "-d")
assert.Assert(t, strings.Contains(res.Combined(), "foo"), res.Combined())
assert.Assert(t, !strings.Contains(res.Combined(), "bar"), res.Combined())
assert.Assert(t, strings.Contains(res.Combined(), " optional dependency \"bar\" failed to start"), res.Combined())
}