Skip to content

Commit

Permalink
more main testing
Browse files Browse the repository at this point in the history
  • Loading branch information
kmulvey committed Oct 5, 2022
1 parent c544084 commit 4ce172d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/app/imagedup/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ func TestNewImageDup(t *testing.T) {

var cacheFile = "TestNewImageDup.json"

var dup, err = NewImageDup("TestNewImageDup", cacheFile, "glob", 2, 3, 10, true)
var dup, err = NewImageDup("TestNewImageDup", cacheFile, "glob", 2, 1, 10, true)
assert.Equal(t, "Skipping glob because there are only 1 files", err.Error())

dup, err = NewImageDup("TestNewImageDup", cacheFile, "glob", 2, 3, 10, true)
assert.NoError(t, err)

files, err := path.ListFiles("./testimages")
Expand Down Expand Up @@ -50,6 +53,8 @@ func TestNewImageDup(t *testing.T) {

<-done

assert.NoError(t, dup.Shutdown())

err = os.RemoveAll(cacheFile)
assert.NoError(t, err)
}

0 comments on commit 4ce172d

Please sign in to comment.