From 9ee11aa7d0bf1cef6d741efcb3a99981ef47208b Mon Sep 17 00:00:00 2001 From: Ritu Sood Date: Fri, 28 Feb 2020 14:34:28 -0800 Subject: Remove String function Removing String from interface as this is not required anymore Issue-ID: MULTICLOUD-1001 Signed-off-by: Ritu Sood Change-Id: I40a950bb343f4cfcc5d51e52e44d0f788fc5e303 --- src/orchestrator/pkg/infra/db/mock.go | 4 +++- src/orchestrator/pkg/infra/db/store.go | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/orchestrator') diff --git a/src/orchestrator/pkg/infra/db/mock.go b/src/orchestrator/pkg/infra/db/mock.go index afa4b024..6b46a524 100644 --- a/src/orchestrator/pkg/infra/db/mock.go +++ b/src/orchestrator/pkg/infra/db/mock.go @@ -15,6 +15,7 @@ package db import ( "encoding/json" + "fmt" pkgerrors "github.com/pkg/errors" ) @@ -62,8 +63,9 @@ func (m *MockDB) Read(table string, key Key, tag string) ([]byte, error) { return nil, m.Err } + str := fmt.Sprintf("%v", key) for k, v := range m.Items { - if k == key.String() { + if k == str { return v[tag], nil } } diff --git a/src/orchestrator/pkg/infra/db/store.go b/src/orchestrator/pkg/infra/db/store.go index c8a8f744..0cf3ef65 100644 --- a/src/orchestrator/pkg/infra/db/store.go +++ b/src/orchestrator/pkg/infra/db/store.go @@ -29,7 +29,6 @@ var DBconn Store // that wants to use the Store interface. This allows various // db backends and key types. type Key interface { - String() string } // Store is an interface for accessing the database -- cgit 1.2.3-korg