瀏覽代碼

Integration test: use filepath.Join() to make path cross-platform

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 6 年之前
父節點
當前提交
05e18429cf
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      integration/volume/volume_test.go

+ 2 - 2
integration/volume/volume_test.go

@@ -2,7 +2,7 @@ package volume
 
 import (
 	"context"
-	"fmt"
+	"path/filepath"
 	"strings"
 	"testing"
 	"time"
@@ -37,7 +37,7 @@ func TestVolumesCreateAndList(t *testing.T) {
 		Driver:     "local",
 		Scope:      "local",
 		Name:       name,
-		Mountpoint: fmt.Sprintf("%s/volumes/%s/_data", testEnv.DaemonInfo.DockerRootDir, name),
+		Mountpoint: filepath.Join(testEnv.DaemonInfo.DockerRootDir, "volumes", name, "_data"),
 	}
 	assert.Check(t, is.DeepEqual(vol, expected, cmpopts.EquateEmpty()))