mirror of
https://github.com/anchore/syft
synced 2024-11-14 16:17:17 +00:00
ca0cc52d47
Signed-off-by: Keith Zantow <kzantow@gmail.com>
18 lines
365 B
Go
18 lines
365 B
Go
package cache
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func Test_bypassedCache(t *testing.T) {
|
|
m := bypassedCache{}
|
|
cache := m.GetCache("name", "version")
|
|
err := cache.Write("test", strings.NewReader("value"))
|
|
require.NoError(t, err)
|
|
rdr, err := cache.Read("test")
|
|
require.Nil(t, rdr)
|
|
require.ErrorIs(t, err, errNotFound)
|
|
}
|