diff options
Diffstat (limited to 'src/k8splugin/internal/db/mongo_test.go')
-rw-r--r-- | src/k8splugin/internal/db/mongo_test.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/k8splugin/internal/db/mongo_test.go b/src/k8splugin/internal/db/mongo_test.go index 5a032b63..3a7e4251 100644 --- a/src/k8splugin/internal/db/mongo_test.go +++ b/src/k8splugin/internal/db/mongo_test.go @@ -84,7 +84,7 @@ func TestCreate(t *testing.T) { label: "Successfull creation of entry", input: map[string]interface{}{ "coll": "collname", - "key": mockKey{Key: "keyvalue"}, + "key": MockKey{Key: "keyvalue"}, "tag": "tagName", "data": "Data In String Format", }, @@ -95,7 +95,7 @@ func TestCreate(t *testing.T) { label: "UnSuccessfull creation of entry", input: map[string]interface{}{ "coll": "collname", - "key": mockKey{Key: "keyvalue"}, + "key": MockKey{Key: "keyvalue"}, "tag": "tagName", "data": "Data In String Format", }, @@ -108,7 +108,7 @@ func TestCreate(t *testing.T) { label: "Missing input fields", input: map[string]interface{}{ "coll": "", - "key": mockKey{Key: ""}, + "key": MockKey{Key: ""}, "tag": "", "data": "", }, @@ -234,7 +234,7 @@ func TestRead(t *testing.T) { label: "Successfull Read of entry", input: map[string]interface{}{ "coll": "collname", - "key": mockKey{Key: "keyvalue"}, + "key": MockKey{Key: "keyvalue"}, "tag": "metadata", }, // Binary form of @@ -264,7 +264,7 @@ func TestRead(t *testing.T) { label: "UnSuccessfull Read of entry: object not found", input: map[string]interface{}{ "coll": "collname", - "key": mockKey{Key: "keyvalue"}, + "key": MockKey{Key: "keyvalue"}, "tag": "badtag", }, // Binary form of @@ -293,7 +293,7 @@ func TestRead(t *testing.T) { label: "UnSuccessfull Read of entry", input: map[string]interface{}{ "coll": "collname", - "key": mockKey{Key: "keyvalue"}, + "key": MockKey{Key: "keyvalue"}, "tag": "tagName", }, mockColl: &mockCollection{ @@ -305,7 +305,7 @@ func TestRead(t *testing.T) { label: "Missing input fields", input: map[string]interface{}{ "coll": "", - "key": mockKey{Key: ""}, + "key": MockKey{Key: ""}, "tag": "", }, expectedError: "Mandatory fields are missing", @@ -355,7 +355,7 @@ func TestDelete(t *testing.T) { label: "Successfull Delete of entry", input: map[string]interface{}{ "coll": "collname", - "key": mockKey{Key: "keyvalue"}, + "key": MockKey{Key: "keyvalue"}, "tag": "metadata", }, // Binary form of @@ -383,7 +383,7 @@ func TestDelete(t *testing.T) { label: "UnSuccessfull Delete of entry", input: map[string]interface{}{ "coll": "collname", - "key": mockKey{Key: "keyvalue"}, + "key": MockKey{Key: "keyvalue"}, "tag": "tagName", }, mockColl: &mockCollection{ @@ -395,7 +395,7 @@ func TestDelete(t *testing.T) { label: "UnSuccessfull Delete, key not found", input: map[string]interface{}{ "coll": "collname", - "key": mockKey{Key: "keyvalue"}, + "key": MockKey{Key: "keyvalue"}, "tag": "tagName", }, // Binary form of @@ -424,7 +424,7 @@ func TestDelete(t *testing.T) { label: "Missing input fields", input: map[string]interface{}{ "coll": "", - "key": mockKey{Key: ""}, + "key": MockKey{Key: ""}, "tag": "", }, expectedError: "Mandatory fields are missing", |