diff options
Diffstat (limited to 'src/orchestrator/pkg/infra/db/mock.go')
-rw-r--r-- | src/orchestrator/pkg/infra/db/mock.go | 27 |
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 } |