From b6f1f0ac8f2d6ca3d20ab254b5bed48543817899 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Tue, 22 Feb 2022 21:13:38 -0500 Subject: nvdmirror/failsetcache: add Delete() --- nvdmirror/failsetcache.go | 5 +++++ nvdmirror/failsetcache_test.go | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/nvdmirror/failsetcache.go b/nvdmirror/failsetcache.go index ed5679b..b119a10 100644 --- a/nvdmirror/failsetcache.go +++ b/nvdmirror/failsetcache.go @@ -17,6 +17,11 @@ func (me FailSetCache) Set(s string, _ map[string]string) error { return fmt.Errorf("set failed: %s", s) } +// Delete value (always succeeds). +func (me FailSetCache) Delete(_ string) error { + return nil +} + // Close cache. Always succeeds func (me FailSetCache) Close() error { return nil diff --git a/nvdmirror/failsetcache_test.go b/nvdmirror/failsetcache_test.go index 8e20a33..d1b91bf 100644 --- a/nvdmirror/failsetcache_test.go +++ b/nvdmirror/failsetcache_test.go @@ -20,6 +20,13 @@ func TestFailSetCache(t *testing.T) { } }) + // test delete + t.Run("Delete", func(t *testing.T) { + if err := cache.Delete("foo"); err != nil { + t.Error(err) + } + }) + // test Close t.Run("Close", func(t *testing.T) { if err := cache.Close(); err != nil { -- cgit v1.2.3