Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kmulvey committed Sep 23, 2022
1 parent 093c713 commit c5cb52b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions internal/app/imagedup/files_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestStreamFiles(t *testing.T) {
t.Parallel()

var cacheFile = "TestStreamFiles"
var id, err = NewImageDup("TestStreamFiles", cacheFile, 2, 10, true)
var id, err = NewImageDup("TestStreamFiles", cacheFile, 2, 3, 10, true)
assert.NoError(t, err)

var done = make(chan struct{})
Expand Down Expand Up @@ -48,7 +48,7 @@ func TestStreamFilesCancel(t *testing.T) {
t.Parallel()

var cacheFile = "TestStreamFiles"
var id, err = NewImageDup("TestStreamFilesCancel", cacheFile, 2, 10, true)
var id, err = NewImageDup("TestStreamFilesCancel", cacheFile, 2, 3, 10, true)
assert.NoError(t, err)

var done = make(chan struct{})
Expand Down
4 changes: 2 additions & 2 deletions internal/app/imagedup/hash/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestCache(t *testing.T) {

var cacheFile = "testcache.json"

var cache, err = NewCache(cacheFile, "TestCache")
var cache, err = NewCache(cacheFile, "TestCache", 3)
assert.NoError(t, err)

files, err := path.ListFiles("../testimages")
Expand All @@ -34,7 +34,7 @@ func TestCache(t *testing.T) {
assert.NoError(t, err)

// do it again
cache, err = NewCache(cacheFile, "TestCache2")
cache, err = NewCache(cacheFile, "TestCache2", 3)
assert.NoError(t, err)
numImages, _ = cache.Stats()
assert.Equal(t, 3, numImages)
Expand Down
2 changes: 1 addition & 1 deletion internal/app/imagedup/hash/differ_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestDiffer(t *testing.T) {
var cacheFile = "testdiffer.json"
var inputImages = make(chan types.Pair)

var cache, err = NewCache(cacheFile, "testdiffer")
var cache, err = NewCache(cacheFile, "testdiffer", 3)
assert.NoError(t, err)

var differ = NewDiffer(2, 10, inputImages, cache, "testdiffer")
Expand Down
2 changes: 1 addition & 1 deletion internal/app/imagedup/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestNewImageDup(t *testing.T) {

var cacheFile = "TestNewImageDup.json"

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

files, err := path.ListFiles("./testimages")
Expand Down

0 comments on commit c5cb52b

Please sign in to comment.