mirror of
https://github.com/grdl/git-get.git
synced 2026-02-07 16:24:15 +00:00
Refactor repoFinder
- Remove io package and move finder to git package - Move tempDir and writeFile into test package. They are only used for testing purposes anyway. - Add a way to specify parent folder for tempDir. Useful for testing nested repos. - Add new test repos with .git/config files
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
"git-get/pkg/io"
|
||||
"git-get/pkg/test"
|
||||
"reflect"
|
||||
"testing"
|
||||
@@ -10,7 +9,7 @@ import (
|
||||
func TestOpen(t *testing.T) {
|
||||
_, err := Open("/paththatdoesnotexist/repo")
|
||||
|
||||
if err != io.ErrDirectoryAccess {
|
||||
if err != errDirectoryAccess {
|
||||
t.Errorf("Opening a repo in non existing path should throw an error")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user