aboutsummaryrefslogtreecommitdiffstats
path: root/src/orchestrator/pkg/infra/db/mock.go
diff options
context:
space:
mode:
authorEric Multanen <eric.w.multanen@intel.com>2020-10-01 16:29:08 -0700
committerEric Multanen <eric.w.multanen@intel.com>2020-10-02 23:12:51 +0000
commit1954c903f56f3c69d0f209eb79dedf806ef04797 (patch)
treeefdc01d7e6ec64ba73d8b0b337db9ecd8e0aa2b0 /src/orchestrator/pkg/infra/db/mock.go
parent1fc90f15489ae3eafeb5994f5285f09750feae4c (diff)
Remove unused mongo db methods from emco code
Remove the set of unused (legacy from v1) mongo db methods so that they are not used in the emco code base. Issue-ID: MULTICLOUD-1227 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: Ibe94892e5b1d0f33192be7ea3db5c55b3f8cbf60
Diffstat (limited to 'src/orchestrator/pkg/infra/db/mock.go')
-rw-r--r--src/orchestrator/pkg/infra/db/mock.go27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/orchestrator/pkg/infra/db/mock.go b/src/orchestrator/pkg/infra/db/mock.go
index e43be8fb..cc3af718 100644
--- a/src/orchestrator/pkg/infra/db/mock.go
+++ b/src/orchestrator/pkg/infra/db/mock.go
@@ -41,18 +41,10 @@ func (m *MockDB) HealthCheck() error {
return m.Err
}
-func (m *MockDB) Create(table string, key Key, tag string, data interface{}) error {
- return m.Err
-}
-
func (m *MockDB) Insert(table string, key Key, query interface{}, tag string, data interface{}) error {
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)
@@ -62,21 +54,6 @@ func (m *MockDB) Unmarshal(inp []byte, out interface{}) error {
return nil
}
-func (m *MockDB) Read(table string, key Key, tag string) ([]byte, error) {
- if m.Err != nil {
- return nil, m.Err
- }
-
- str := fmt.Sprintf("%v", key)
- for k, v := range m.Items {
- if k == str {
- return v[tag], nil
- }
- }
-
- return nil, m.Err
-}
-
func (m *MockDB) Find(table string, key Key, tag string) ([][]byte, error) {
if m.Err != nil {
return nil, m.Err
@@ -93,10 +70,6 @@ func (m *MockDB) Find(table string, key Key, tag string) ([][]byte, error) {
return nil, m.Err
}
-func (m *MockDB) Delete(table string, key Key, tag string) error {
- return m.Err
-}
-
func (m *MockDB) Remove(table string, key Key) error {
return m.Err
}