Remotecache: rename setbytearray/getbytearray to set/get and remove codec (#64470)

Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
Carl Bergquist
2023-03-10 13:57:29 +01:00
committed by GitHub
parent 93b32eec4b
commit eb507dca89
15 changed files with 164 additions and 223 deletions
@@ -17,11 +17,10 @@ func TestDatabaseStorageGarbageCollection(t *testing.T) {
db := &databaseCache{
SQLStore: sqlstore,
codec: &gobCodec{},
log: log.New("remotecache.database"),
}
obj := &CacheableStruct{String: "foolbar"}
obj := []byte("foolbar")
// set time.now to 2 weeks ago
var err error
@@ -66,11 +65,10 @@ func TestSecondSet(t *testing.T) {
db := &databaseCache{
SQLStore: sqlstore,
codec: &gobCodec{},
log: log.New("remotecache.database"),
}
obj := &CacheableStruct{String: "hey!"}
obj := []byte("hey!")
err = db.Set(context.Background(), "killa-gorilla", obj, 0)
assert.Equal(t, err, nil)
@@ -84,11 +82,10 @@ func TestDatabaseStorageCount(t *testing.T) {
db := &databaseCache{
SQLStore: sqlstore,
codec: &gobCodec{},
log: log.New("remotecache.database"),
}
obj := &CacheableStruct{String: "foolbar"}
obj := []byte("foolbar")
// set time.now to 2 weeks ago
var err error