Browse Source

labels use absolute paths

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 4 years ago
parent
commit
ff0864237c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      local/compose/kill_test.go

+ 4 - 1
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 {