Use local repository for SyncCommand tests
This commit is contained in:
parent
38cd52ffd6
commit
5c98ab6554
@ -17,14 +17,14 @@ func TestSyncInit(t *testing.T) {
|
|||||||
|
|
||||||
func TestSyncCommand(t *testing.T) {
|
func TestSyncCommand(t *testing.T) {
|
||||||
|
|
||||||
workdir := createTmpDir()
|
testSetup := getTestSetup()
|
||||||
|
|
||||||
sync := Synchronizer{
|
sync := Synchronizer{
|
||||||
workspace: workdir,
|
workspace: testSetup.rootFS.Root(),
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg := config.RepositoryConfig{
|
cfg := config.RepositoryConfig{
|
||||||
Src: "https://github.com/avelino/awesome-go",
|
Src: fmt.Sprintf("file://%v", testSetup.baseRepository.fileSystem.Root()),
|
||||||
Dest: "awesome-go",
|
Dest: "awesome-go",
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ func TestSyncCommand(t *testing.T) {
|
|||||||
t.Errorf("Unexpected error: %v", cloneStatus.Message)
|
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 {
|
if err != nil {
|
||||||
t.Errorf("Unexpected error: %v", err.Error())
|
t.Errorf("Unexpected error: %v", err.Error())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user