Use local repository for SyncCommand tests

This commit is contained in:
Mikołaj Pęczkowski 2021-11-07 00:43:53 +01:00
parent 38cd52ffd6
commit 5c98ab6554

View File

@ -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())
}