Remove potential integer overflow conversion uint64 -> int64

This commit is contained in:
Deluan 2024-08-22 19:28:22 -04:00
parent 5d81849603
commit c95fa11a2f
4 changed files with 14 additions and 12 deletions

View file

@ -20,7 +20,7 @@ var _ = Describe("FileHaunter", func() {
var cacheDir string
var err error
var maxItems int
var maxSize int64
var maxSize uint64
JustBeforeEach(func() {
tempDir, _ := os.MkdirTemp("", "spread_fs")
@ -29,7 +29,9 @@ var _ = Describe("FileHaunter", func() {
Expect(err).ToNot(HaveOccurred())
DeferCleanup(func() { _ = os.RemoveAll(tempDir) })
fsCache, err = fscache.NewCacheWithHaunter(fs, fscache.NewLRUHaunterStrategy(cache.NewFileHaunter("", maxItems, maxSize, 300*time.Millisecond)))
fsCache, err = fscache.NewCacheWithHaunter(fs, fscache.NewLRUHaunterStrategy(
cache.NewFileHaunter("", maxItems, maxSize, 300*time.Millisecond),
))
Expect(err).ToNot(HaveOccurred())
DeferCleanup(fsCache.Clean)