fix test on windows

This commit is contained in:
Matthew Hooker 2017-02-06 11:29:39 -08:00
parent 0f445dff07
commit a836268490
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package ansiblelocal
import (
"io/ioutil"
"os"
"path/filepath"
"strings"
"testing"
@ -38,7 +39,7 @@ func TestProvisionerPrepare_Defaults(t *testing.T) {
t.Fatalf("err: %s", err)
}
if !strings.HasPrefix(p.config.StagingDir, DefaultStagingDir) {
if !strings.HasPrefix(filepath.ToSlash(p.config.StagingDir), DefaultStagingDir) {
t.Fatalf("unexpected staging dir %s, expected %s",
p.config.StagingDir, DefaultStagingDir)
}