diff --git a/commands/sync_cmd_test.go b/commands/sync_cmd_test.go index bed4eaf..2d5b089 100644 --- a/commands/sync_cmd_test.go +++ b/commands/sync_cmd_test.go @@ -17,14 +17,14 @@ func TestSyncInit(t *testing.T) { func TestSyncCommand(t *testing.T) { - workdir := createTmpDir() + testSetup := getTestSetup() sync := Synchronizer{ - workspace: workdir, + workspace: testSetup.rootFS.Root(), } cfg := config.RepositoryConfig{ - Src: "https://github.com/avelino/awesome-go", + Src: fmt.Sprintf("file://%v", testSetup.baseRepository.fileSystem.Root()), Dest: "awesome-go", } @@ -38,7 +38,7 @@ func TestSyncCommand(t *testing.T) { t.Errorf("Unexpected error: %v", cloneStatus.Message) } - info, err := os.Stat(fmt.Sprintf("%v/awesome-go/.git", workdir)) + info, err := os.Stat(fmt.Sprintf("%v/awesome-go/.git", testSetup.rootFS.Root())) if err != nil { t.Errorf("Unexpected error: %v", err.Error()) }