summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/internal/db/testing.go
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2019-03-27 11:54:55 -0700
committerKiran Kamineni <kiran.k.kamineni@intel.com>2019-03-27 14:06:02 -0700
commitb6288d59577dd40d6d19841bf030c45f9ec8aa50 (patch)
treea920be4c664076d88483dc3b2549c9f2016d2707 /src/k8splugin/internal/db/testing.go
parent1ab1af62578c1c2bf7b3b2e56827fe408cabdbb3 (diff)
Add update method to db interface
Add update interface to the db. This will allow us to support PUT http methods in the future. Issue-ID: MULTICLOUD-553 Change-Id: I7263d42e893734eadbdaf78022005d6004601772 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'src/k8splugin/internal/db/testing.go')
-rw-r--r--src/k8splugin/internal/db/testing.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/k8splugin/internal/db/testing.go b/src/k8splugin/internal/db/testing.go
index a411790e..f9be20f6 100644
--- a/src/k8splugin/internal/db/testing.go
+++ b/src/k8splugin/internal/db/testing.go
@@ -41,6 +41,10 @@ func (m *MockDB) Create(table string, key Key, tag string, data interface{}) err
return m.Err
}
+func (m *MockDB) Update(table string, key Key, tag string, data interface{}) error {
+ return m.Err
+}
+
// MockDB uses simple JSON and not BSON
func (m *MockDB) Unmarshal(inp []byte, out interface{}) error {
err := json.Unmarshal(inp, out)