Skip to content

Commit

Permalink
fix: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
schollz committed Dec 31, 2024
1 parent 5318814 commit 42bde22
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/croc/croc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func TestCrocReadme(t *testing.T) {
var wg sync.WaitGroup
wg.Add(2)
go func() {
filesInfo, emptyFolders, totalNumberFolders, errGet := GetFilesInfo([]string{"../../README.md"}, false, false)
filesInfo, emptyFolders, totalNumberFolders, errGet := GetFilesInfo([]string{"../../README.md"}, false, false, []string{})
if errGet != nil {
t.Errorf("failed to get minimal info: %v", errGet)
}
Expand Down Expand Up @@ -134,7 +134,7 @@ func TestCrocEmptyFolder(t *testing.T) {
var wg sync.WaitGroup
wg.Add(2)
go func() {
filesInfo, emptyFolders, totalNumberFolders, errGet := GetFilesInfo([]string{pathName}, false, false)
filesInfo, emptyFolders, totalNumberFolders, errGet := GetFilesInfo([]string{pathName}, false, false, []string{})
if errGet != nil {
t.Errorf("failed to get minimal info: %v", errGet)
}
Expand Down Expand Up @@ -202,7 +202,7 @@ func TestCrocSymlink(t *testing.T) {
var wg sync.WaitGroup
wg.Add(2)
go func() {
filesInfo, emptyFolders, totalNumberFolders, errGet := GetFilesInfo([]string{pathName}, false, false)
filesInfo, emptyFolders, totalNumberFolders, errGet := GetFilesInfo([]string{pathName}, false, false, []string{})
if errGet != nil {
t.Errorf("failed to get minimal info: %v", errGet)
}
Expand Down Expand Up @@ -248,7 +248,7 @@ func TestCrocIgnoreGit(t *testing.T) {
}
time.Sleep(1 * time.Second)
// due to how files are ignored in this function, all we have to do to test is make sure LICENSE doesn't get included in FilesInfo.
filesInfo, _, _, errGet := GetFilesInfo([]string{"../../LICENSE", ".gitignore", "croc.go"}, false, true)
filesInfo, _, _, errGet := GetFilesInfo([]string{"../../LICENSE", ".gitignore", "croc.go"}, false, true, []string{})
if errGet != nil {
t.Errorf("failed to get minimal info: %v", errGet)
}
Expand Down Expand Up @@ -306,7 +306,7 @@ func TestCrocLocal(t *testing.T) {
os.Create("touched")
wg.Add(2)
go func() {
filesInfo, emptyFolders, totalNumberFolders, errGet := GetFilesInfo([]string{"../../LICENSE", "touched"}, false, false)
filesInfo, emptyFolders, totalNumberFolders, errGet := GetFilesInfo([]string{"../../LICENSE", "touched"}, false, false, []string{})
if errGet != nil {
t.Errorf("failed to get minimal info: %v", errGet)
}
Expand Down Expand Up @@ -359,7 +359,7 @@ func TestCrocError(t *testing.T) {
Curve: "siec",
Overwrite: true,
})
filesInfo, emptyFolders, totalNumberFolders, errGet := GetFilesInfo([]string{tmpfile.Name()}, false, false)
filesInfo, emptyFolders, totalNumberFolders, errGet := GetFilesInfo([]string{tmpfile.Name()}, false, false, []string{})
if errGet != nil {
t.Errorf("failed to get minimal info: %v", errGet)
}
Expand Down

0 comments on commit 42bde22

Please sign in to comment.