X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=internal%2Fmocks%2Fdb_mocks_private_testing.go;h=1a4e29b0d971ffa82c3eba1e66fa911685ecae2c;hb=40508c8e2b5154083afffffdfbc9ffcf2c7f868c;hp=06927cbf62569d86b4a677bfcf64c369d3eed5d2;hpb=b1cc9affa891649332fb034f648e44514624a956;p=ric-plt%2Fsdlgo.git diff --git a/internal/mocks/db_mocks_private_testing.go b/internal/mocks/db_mocks_private_testing.go index 06927cb..1a4e29b 100644 --- a/internal/mocks/db_mocks_private_testing.go +++ b/internal/mocks/db_mocks_private_testing.go @@ -41,6 +41,16 @@ func (m *MockDB) State() (*sdlgoredis.DbState, error) { return a.Get(0).(*sdlgoredis.DbState), a.Error(1) } +func (m *MockDB) Keys(pattern string) ([]string, error) { + a := m.Called(pattern) + return a.Get(0).([]string), a.Error(1) +} + +func (m *MockDB) Statistics() (*sdlgoredis.DbStatistics, error) { + a := m.Called() + return a.Get(0).(*sdlgoredis.DbStatistics), a.Error(1) +} + type MockSdlApi struct { mock.Mock } @@ -59,3 +69,8 @@ func (m *MockSdlApi) Remove(ns string, keys []string) error { a := m.Called(ns, keys) return a.Error(0) } + +func (m *MockSdlApi) Get(ns string, keys []string) (map[string]interface{}, error) { + a := m.Called(ns, keys) + return a.Get(0).(map[string]interface{}), a.Error(1) +}