summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/internal/db/mongo_test.go
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2019-03-15 15:18:12 -0700
committerKiran Kamineni <kiran.k.kamineni@intel.com>2019-03-26 19:19:53 -0700
commitb2b175eae0f4e8b5b0cb9ccbeeca1e98065feeb5 (patch)
treee5a984dd156016b3b615acfd0b903f61e07655ea /src/k8splugin/internal/db/mongo_test.go
parent1ab1af62578c1c2bf7b3b2e56827fe408cabdbb3 (diff)
Update definition and profile to latest spec
Bringing all the definition and profile code upto the latest spec. Integrated the end to end instance code changes that were made. P9: Added updated plugin.sh with updated uri paths based on spec Issue-ID: MULTICLOUD-291 Change-Id: Id6e3c6bc2cd02cfb7005e203ccf03e0793b97e95 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'src/k8splugin/internal/db/mongo_test.go')
-rw-r--r--src/k8splugin/internal/db/mongo_test.go22
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 deb51044..baa442ce 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": "",
},
@@ -156,7 +156,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
@@ -186,7 +186,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
@@ -215,7 +215,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{
@@ -227,7 +227,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",
@@ -277,7 +277,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
@@ -305,7 +305,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{
@@ -317,7 +317,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
@@ -346,7 +346,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",