diff --git a/cli/server/dump_test.go b/cli/server/dump_test.go index f6d3cae67..6a407fdba 100644 --- a/cli/server/dump_test.go +++ b/cli/server/dump_test.go @@ -3,6 +3,7 @@ package server import ( "io/ioutil" "os" + "path" "testing" "github.com/stretchr/testify/require" @@ -15,15 +16,15 @@ func TestGetPath(t *testing.T) { err := os.RemoveAll(testPath) require.NoError(t, err) }) - path, err := getPath(testPath, 123) + actual, err := getPath(testPath, 123) require.NoError(t, err) - require.Equal(t, testPath+"/BlockStorage_100000/dump-block-1000.json", path) + require.Equal(t, path.Join(testPath, "/BlockStorage_100000/dump-block-1000.json"), actual) - path, err = getPath(testPath, 1230) + actual, err = getPath(testPath, 1230) require.NoError(t, err) - require.Equal(t, testPath+"/BlockStorage_100000/dump-block-2000.json", path) + require.Equal(t, path.Join(testPath, "/BlockStorage_100000/dump-block-2000.json"), actual) - path, err = getPath(testPath, 123000) + actual, err = getPath(testPath, 123000) require.NoError(t, err) - require.Equal(t, testPath+"/BlockStorage_200000/dump-block-123000.json", path) + require.Equal(t, path.Join(testPath, "/BlockStorage_200000/dump-block-123000.json"), actual) }