From 3ce96f9b0e240c7f6c13deec8190fd93fee1a7ca Mon Sep 17 00:00:00 2001 From: kukymbr Date: Tue, 5 Mar 2024 01:07:20 +0300 Subject: [PATCH] add Close test calls --- filecache_test.go | 4 ++++ gcinterval_test.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/filecache_test.go b/filecache_test.go index ca6ab18..db389bb 100644 --- a/filecache_test.go +++ b/filecache_test.go @@ -43,6 +43,10 @@ func TestNew_WhenValid_ExpectNoError(t *testing.T) { assert.NotEmpty(t, fc.GetPath()) assert.NotEqual(t, ".", fc.GetPath()) assert.DirExists(t, fc.GetPath(), i) + + err = fc.Close() + + assert.NoError(t, err) } } diff --git a/gcinterval_test.go b/gcinterval_test.go index 70af20a..ebda9fa 100644 --- a/gcinterval_test.go +++ b/gcinterval_test.go @@ -26,4 +26,8 @@ func TestIntervalGarbageCollector(t *testing.T) { assert.NoFileExists(t, "./testdata/gc/test1.cache--meta") assert.FileExists(t, "./testdata/gc/test2.cache") assert.FileExists(t, "./testdata/gc/test2.cache--meta") + + err := gc.Close() + + assert.NoError(t, err) }