From a92f55e2ce14ddf3b8d115f3740b0f88aee8b149 Mon Sep 17 00:00:00 2001 From: "Pablo M. Bermudo Garay" Date: Wed, 9 Feb 2022 23:04:16 +0100 Subject: Adapt memory backend to the new interface The introduction of the file backend required some breaking changes to the interface between the http server and the backends. This commit adapts the memory backend to the new interface. --- objectstore/memory_backend_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'objectstore/memory_backend_test.go') diff --git a/objectstore/memory_backend_test.go b/objectstore/memory_backend_test.go index 3fbe7a5..c50d97f 100644 --- a/objectstore/memory_backend_test.go +++ b/objectstore/memory_backend_test.go @@ -15,7 +15,7 @@ func TestCreateAndGet(t *testing.T) { // Create the object bucketId := "foo" objectId := "bar" - objectContent := "Lorem ipsum" + objectContent := []byte("Lorem ipsum") objects.CreateObject(bucketId, objectId, objectContent) // Retrieve the object @@ -25,7 +25,7 @@ func TestCreateAndGet(t *testing.T) { } // Check the object content - if object != objectContent { + if object != string(objectContent) { t.Errorf("Check test object. Got (%v), want (%v)", object, objectContent) } @@ -42,7 +42,7 @@ func TestCreateAndDelete(t *testing.T) { // Create the object bucketId := "foo" objectId := "bar" - objectContent := "Lorem ipsum" + objectContent := []byte("Lorem ipsum") objects.CreateObject(bucketId, objectId, objectContent) // Try to delete a non-existent object @@ -77,7 +77,7 @@ func TestDuplicatesDetection(t *testing.T) { // Create an object bucketId := "foo" objectId := "bar" - objectContent := "Lorem ipsum" + objectContent := []byte("Lorem ipsum") objects.CreateObject(bucketId, objectId, objectContent) // Error type reference -- cgit v1.2.3-70-g09d2