From ff0864237c744d289e258549b8a108e6f343ed79 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Fri, 11 Jun 2021 09:44:28 +0200 Subject: [PATCH] labels use absolute paths Signed-off-by: Nicolas De Loof --- local/compose/kill_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/local/compose/kill_test.go b/local/compose/kill_test.go index 6216a67d8..81caeb51d 100644 --- a/local/compose/kill_test.go +++ b/local/compose/kill_test.go @@ -18,6 +18,7 @@ package compose import ( "context" + "path/filepath" "testing" "github.com/docker/docker/api/types/filters" @@ -83,7 +84,9 @@ func testContainer(service string, id string) apitypes.Container { } func containerLabels(service string) map[string]string { - return map[string]string{serviceLabel: service, configFilesLabel: "docker-compose.yml", workingDirLabel: "testdata", projectLabel: testProject} + workingdir, _ := filepath.Abs("testdata") + composefile := filepath.Join(workingdir, "docker-compose.yml") + return map[string]string{serviceLabel: service, configFilesLabel: composefile, workingDirLabel: workingdir, projectLabel: testProject} } func anyCancellableContext() gomock.Matcher {