Browse Source

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 6 năm trước cách đây
mục cha
commit
05e18429cf
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      integration/volume/volume_test.go

+ 2 - 2
integration/volume/volume_test.go

@@ -2,7 +2,7 @@ package volume
 
 
 import (
 import (
 	"context"
 	"context"
-	"fmt"
+	"path/filepath"
 	"strings"
 	"strings"
 	"testing"
 	"testing"
 	"time"
 	"time"
@@ -37,7 +37,7 @@ func TestVolumesCreateAndList(t *testing.T) {
 		Driver:     "local",
 		Driver:     "local",
 		Scope:      "local",
 		Scope:      "local",
 		Name:       name,
 		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()))
 	assert.Check(t, is.DeepEqual(vol, expected, cmpopts.EquateEmpty()))