X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=capifcore%2Finternal%2Fkeycloak%2Fmocks%2FAccessManagement.go;h=59b914a1a79ef85ae9a979c41f20a060a7ae2fe6;hb=051a4a32068b4718ef9ddb1868e532a976de843e;hp=9ac217901b9a572416756c458f605be19fc255de;hpb=b2a87e363829f6447b4f06c1aa4524608bbeb422;p=nonrtric%2Fplt%2Fsme.git diff --git a/capifcore/internal/keycloak/mocks/AccessManagement.go b/capifcore/internal/keycloak/mocks/AccessManagement.go index 9ac2179..59b914a 100644 --- a/capifcore/internal/keycloak/mocks/AccessManagement.go +++ b/capifcore/internal/keycloak/mocks/AccessManagement.go @@ -12,23 +12,37 @@ type AccessManagement struct { mock.Mock } -// GetToken provides a mock function with given fields: clientId, clientPassword, scope, realm -func (_m *AccessManagement) GetToken(clientId string, clientPassword string, scope string, realm string) (keycloak.Jwttoken, error) { - ret := _m.Called(clientId, clientPassword, scope, realm) +// AddClient provides a mock function with given fields: clientId, realm +func (_m *AccessManagement) AddClient(clientId string, realm string) error { + ret := _m.Called(clientId, realm) + + var r0 error + if rf, ok := ret.Get(0).(func(string, string) error); ok { + r0 = rf(clientId, realm) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// GetToken provides a mock function with given fields: realm, data +func (_m *AccessManagement) GetToken(realm string, data map[string][]string) (keycloak.Jwttoken, error) { + ret := _m.Called(realm, data) var r0 keycloak.Jwttoken var r1 error - if rf, ok := ret.Get(0).(func(string, string, string, string) (keycloak.Jwttoken, error)); ok { - return rf(clientId, clientPassword, scope, realm) + if rf, ok := ret.Get(0).(func(string, map[string][]string) (keycloak.Jwttoken, error)); ok { + return rf(realm, data) } - if rf, ok := ret.Get(0).(func(string, string, string, string) keycloak.Jwttoken); ok { - r0 = rf(clientId, clientPassword, scope, realm) + if rf, ok := ret.Get(0).(func(string, map[string][]string) keycloak.Jwttoken); ok { + r0 = rf(realm, data) } else { r0 = ret.Get(0).(keycloak.Jwttoken) } - if rf, ok := ret.Get(1).(func(string, string, string, string) error); ok { - r1 = rf(clientId, clientPassword, scope, realm) + if rf, ok := ret.Get(1).(func(string, map[string][]string) error); ok { + r1 = rf(realm, data) } else { r1 = ret.Error(1) }