diff options
author | Ritu Sood <ritu.sood@intel.com> | 2020-02-25 00:02:05 -0800 |
---|---|---|
committer | Ritu Sood <ritu.sood@intel.com> | 2020-02-27 21:16:34 -0800 |
commit | 5fa81fb475007e1c282791ae20ede51849b7ad29 (patch) | |
tree | ae4140d79a701fdb6010d791a5b84445121451b6 /src/orchestrator/pkg/infra/db/mock.go | |
parent | bc6c2db66326040062fca588ea5a23e963b3b784 (diff) |
Update MongoDb to add new methods
This patch adds new functions Insert, Find and
Delete. These functions embeds fields in documents
rather than storing as seprate documents.
Issue-ID: MULTICLOUD-1001
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
Change-Id: Idda2893b5459bbeb441f8f0ea6141ad1f3a0aba2
Diffstat (limited to 'src/orchestrator/pkg/infra/db/mock.go')
-rw-r--r-- | src/orchestrator/pkg/infra/db/mock.go | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/orchestrator/pkg/infra/db/mock.go b/src/orchestrator/pkg/infra/db/mock.go index 1dbca4b4..afa4b024 100644 --- a/src/orchestrator/pkg/infra/db/mock.go +++ b/src/orchestrator/pkg/infra/db/mock.go @@ -75,20 +75,3 @@ func (m *MockDB) Delete(table string, key Key, tag string) error { return m.Err } -func (m *MockDB) ReadAll(table string, tag string) (map[string][]byte, error) { - if m.Err != nil { - return nil, m.Err - } - - ret := make(map[string][]byte) - - for k, v := range m.Items { - for k1, v1 := range v { - if k1 == tag { - ret[k] = v1 - } - } - } - - return ret, nil -} |