summaryrefslogtreecommitdiff
path: root/objectstore/memory_backend_test.go
diff options
context:
space:
mode:
authorPablo M. Bermudo Garay <pablombg@gmail.com>2022-02-09 23:04:16 +0100
committerPablo M. Bermudo Garay <pablombg@gmail.com>2022-02-10 13:14:19 +0100
commita92f55e2ce14ddf3b8d115f3740b0f88aee8b149 (patch)
tree879c7ec454be477761530cc60c8dfe00d177cb45 /objectstore/memory_backend_test.go
parent3aa4d62526537ec0fe624899a2f05566ea80a198 (diff)
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.
Diffstat (limited to 'objectstore/memory_backend_test.go')
-rw-r--r--objectstore/memory_backend_test.go8
1 files changed, 4 insertions, 4 deletions
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