fix mocks and test
This commit is contained in:
parent
90b99d4d2b
commit
e5730f2494
9 changed files with 228 additions and 223 deletions
|
@ -1,43 +1,41 @@
|
|||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: github.com/zitadel/oidc/pkg/op (interfaces: Client)
|
||||
// Source: github.com/zitadel/oidc/v2/pkg/op (interfaces: Client)
|
||||
|
||||
// Package mock is a generated GoMock package.
|
||||
package mock
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
time "time"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
|
||||
oidc "github.com/zitadel/oidc/v2/pkg/oidc"
|
||||
op "github.com/zitadel/oidc/v2/pkg/op"
|
||||
reflect "reflect"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// MockClient is a mock of Client interface.
|
||||
// MockClient is a mock of Client interface
|
||||
type MockClient struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockClientMockRecorder
|
||||
}
|
||||
|
||||
// MockClientMockRecorder is the mock recorder for MockClient.
|
||||
// MockClientMockRecorder is the mock recorder for MockClient
|
||||
type MockClientMockRecorder struct {
|
||||
mock *MockClient
|
||||
}
|
||||
|
||||
// NewMockClient creates a new mock instance.
|
||||
// NewMockClient creates a new mock instance
|
||||
func NewMockClient(ctrl *gomock.Controller) *MockClient {
|
||||
mock := &MockClient{ctrl: ctrl}
|
||||
mock.recorder = &MockClientMockRecorder{mock}
|
||||
return mock
|
||||
}
|
||||
|
||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
||||
// EXPECT returns an object that allows the caller to indicate expected use
|
||||
func (m *MockClient) EXPECT() *MockClientMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// AccessTokenType mocks base method.
|
||||
// AccessTokenType mocks base method
|
||||
func (m *MockClient) AccessTokenType() op.AccessTokenType {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "AccessTokenType")
|
||||
|
@ -45,13 +43,13 @@ func (m *MockClient) AccessTokenType() op.AccessTokenType {
|
|||
return ret0
|
||||
}
|
||||
|
||||
// AccessTokenType indicates an expected call of AccessTokenType.
|
||||
// AccessTokenType indicates an expected call of AccessTokenType
|
||||
func (mr *MockClientMockRecorder) AccessTokenType() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccessTokenType", reflect.TypeOf((*MockClient)(nil).AccessTokenType))
|
||||
}
|
||||
|
||||
// ApplicationType mocks base method.
|
||||
// ApplicationType mocks base method
|
||||
func (m *MockClient) ApplicationType() op.ApplicationType {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ApplicationType")
|
||||
|
@ -59,13 +57,13 @@ func (m *MockClient) ApplicationType() op.ApplicationType {
|
|||
return ret0
|
||||
}
|
||||
|
||||
// ApplicationType indicates an expected call of ApplicationType.
|
||||
// ApplicationType indicates an expected call of ApplicationType
|
||||
func (mr *MockClientMockRecorder) ApplicationType() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationType", reflect.TypeOf((*MockClient)(nil).ApplicationType))
|
||||
}
|
||||
|
||||
// AuthMethod mocks base method.
|
||||
// AuthMethod mocks base method
|
||||
func (m *MockClient) AuthMethod() oidc.AuthMethod {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "AuthMethod")
|
||||
|
@ -73,13 +71,13 @@ func (m *MockClient) AuthMethod() oidc.AuthMethod {
|
|||
return ret0
|
||||
}
|
||||
|
||||
// AuthMethod indicates an expected call of AuthMethod.
|
||||
// AuthMethod indicates an expected call of AuthMethod
|
||||
func (mr *MockClientMockRecorder) AuthMethod() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMethod", reflect.TypeOf((*MockClient)(nil).AuthMethod))
|
||||
}
|
||||
|
||||
// ClockSkew mocks base method.
|
||||
// ClockSkew mocks base method
|
||||
func (m *MockClient) ClockSkew() time.Duration {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ClockSkew")
|
||||
|
@ -87,13 +85,13 @@ func (m *MockClient) ClockSkew() time.Duration {
|
|||
return ret0
|
||||
}
|
||||
|
||||
// ClockSkew indicates an expected call of ClockSkew.
|
||||
// ClockSkew indicates an expected call of ClockSkew
|
||||
func (mr *MockClientMockRecorder) ClockSkew() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClockSkew", reflect.TypeOf((*MockClient)(nil).ClockSkew))
|
||||
}
|
||||
|
||||
// DevMode mocks base method.
|
||||
// DevMode mocks base method
|
||||
func (m *MockClient) DevMode() bool {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DevMode")
|
||||
|
@ -101,13 +99,13 @@ func (m *MockClient) DevMode() bool {
|
|||
return ret0
|
||||
}
|
||||
|
||||
// DevMode indicates an expected call of DevMode.
|
||||
// DevMode indicates an expected call of DevMode
|
||||
func (mr *MockClientMockRecorder) DevMode() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DevMode", reflect.TypeOf((*MockClient)(nil).DevMode))
|
||||
}
|
||||
|
||||
// GetID mocks base method.
|
||||
// GetID mocks base method
|
||||
func (m *MockClient) GetID() string {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetID")
|
||||
|
@ -115,13 +113,13 @@ func (m *MockClient) GetID() string {
|
|||
return ret0
|
||||
}
|
||||
|
||||
// GetID indicates an expected call of GetID.
|
||||
// GetID indicates an expected call of GetID
|
||||
func (mr *MockClientMockRecorder) GetID() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetID", reflect.TypeOf((*MockClient)(nil).GetID))
|
||||
}
|
||||
|
||||
// GrantTypes mocks base method.
|
||||
// GrantTypes mocks base method
|
||||
func (m *MockClient) GrantTypes() []oidc.GrantType {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GrantTypes")
|
||||
|
@ -129,13 +127,13 @@ func (m *MockClient) GrantTypes() []oidc.GrantType {
|
|||
return ret0
|
||||
}
|
||||
|
||||
// GrantTypes indicates an expected call of GrantTypes.
|
||||
// GrantTypes indicates an expected call of GrantTypes
|
||||
func (mr *MockClientMockRecorder) GrantTypes() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantTypes", reflect.TypeOf((*MockClient)(nil).GrantTypes))
|
||||
}
|
||||
|
||||
// IDTokenLifetime mocks base method.
|
||||
// IDTokenLifetime mocks base method
|
||||
func (m *MockClient) IDTokenLifetime() time.Duration {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "IDTokenLifetime")
|
||||
|
@ -143,13 +141,13 @@ func (m *MockClient) IDTokenLifetime() time.Duration {
|
|||
return ret0
|
||||
}
|
||||
|
||||
// IDTokenLifetime indicates an expected call of IDTokenLifetime.
|
||||
// IDTokenLifetime indicates an expected call of IDTokenLifetime
|
||||
func (mr *MockClientMockRecorder) IDTokenLifetime() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IDTokenLifetime", reflect.TypeOf((*MockClient)(nil).IDTokenLifetime))
|
||||
}
|
||||
|
||||
// IDTokenUserinfoClaimsAssertion mocks base method.
|
||||
// IDTokenUserinfoClaimsAssertion mocks base method
|
||||
func (m *MockClient) IDTokenUserinfoClaimsAssertion() bool {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "IDTokenUserinfoClaimsAssertion")
|
||||
|
@ -157,13 +155,13 @@ func (m *MockClient) IDTokenUserinfoClaimsAssertion() bool {
|
|||
return ret0
|
||||
}
|
||||
|
||||
// IDTokenUserinfoClaimsAssertion indicates an expected call of IDTokenUserinfoClaimsAssertion.
|
||||
// IDTokenUserinfoClaimsAssertion indicates an expected call of IDTokenUserinfoClaimsAssertion
|
||||
func (mr *MockClientMockRecorder) IDTokenUserinfoClaimsAssertion() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IDTokenUserinfoClaimsAssertion", reflect.TypeOf((*MockClient)(nil).IDTokenUserinfoClaimsAssertion))
|
||||
}
|
||||
|
||||
// IsScopeAllowed mocks base method.
|
||||
// IsScopeAllowed mocks base method
|
||||
func (m *MockClient) IsScopeAllowed(arg0 string) bool {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "IsScopeAllowed", arg0)
|
||||
|
@ -171,13 +169,13 @@ func (m *MockClient) IsScopeAllowed(arg0 string) bool {
|
|||
return ret0
|
||||
}
|
||||
|
||||
// IsScopeAllowed indicates an expected call of IsScopeAllowed.
|
||||
// IsScopeAllowed indicates an expected call of IsScopeAllowed
|
||||
func (mr *MockClientMockRecorder) IsScopeAllowed(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsScopeAllowed", reflect.TypeOf((*MockClient)(nil).IsScopeAllowed), arg0)
|
||||
}
|
||||
|
||||
// LoginURL mocks base method.
|
||||
// LoginURL mocks base method
|
||||
func (m *MockClient) LoginURL(arg0 string) string {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "LoginURL", arg0)
|
||||
|
@ -185,13 +183,13 @@ func (m *MockClient) LoginURL(arg0 string) string {
|
|||
return ret0
|
||||
}
|
||||
|
||||
// LoginURL indicates an expected call of LoginURL.
|
||||
// LoginURL indicates an expected call of LoginURL
|
||||
func (mr *MockClientMockRecorder) LoginURL(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoginURL", reflect.TypeOf((*MockClient)(nil).LoginURL), arg0)
|
||||
}
|
||||
|
||||
// PostLogoutRedirectURIs mocks base method.
|
||||
// PostLogoutRedirectURIs mocks base method
|
||||
func (m *MockClient) PostLogoutRedirectURIs() []string {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "PostLogoutRedirectURIs")
|
||||
|
@ -199,13 +197,13 @@ func (m *MockClient) PostLogoutRedirectURIs() []string {
|
|||
return ret0
|
||||
}
|
||||
|
||||
// PostLogoutRedirectURIs indicates an expected call of PostLogoutRedirectURIs.
|
||||
// PostLogoutRedirectURIs indicates an expected call of PostLogoutRedirectURIs
|
||||
func (mr *MockClientMockRecorder) PostLogoutRedirectURIs() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PostLogoutRedirectURIs", reflect.TypeOf((*MockClient)(nil).PostLogoutRedirectURIs))
|
||||
}
|
||||
|
||||
// RedirectURIs mocks base method.
|
||||
// RedirectURIs mocks base method
|
||||
func (m *MockClient) RedirectURIs() []string {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "RedirectURIs")
|
||||
|
@ -213,13 +211,13 @@ func (m *MockClient) RedirectURIs() []string {
|
|||
return ret0
|
||||
}
|
||||
|
||||
// RedirectURIs indicates an expected call of RedirectURIs.
|
||||
// RedirectURIs indicates an expected call of RedirectURIs
|
||||
func (mr *MockClientMockRecorder) RedirectURIs() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RedirectURIs", reflect.TypeOf((*MockClient)(nil).RedirectURIs))
|
||||
}
|
||||
|
||||
// ResponseTypes mocks base method.
|
||||
// ResponseTypes mocks base method
|
||||
func (m *MockClient) ResponseTypes() []oidc.ResponseType {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ResponseTypes")
|
||||
|
@ -227,13 +225,13 @@ func (m *MockClient) ResponseTypes() []oidc.ResponseType {
|
|||
return ret0
|
||||
}
|
||||
|
||||
// ResponseTypes indicates an expected call of ResponseTypes.
|
||||
// ResponseTypes indicates an expected call of ResponseTypes
|
||||
func (mr *MockClientMockRecorder) ResponseTypes() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResponseTypes", reflect.TypeOf((*MockClient)(nil).ResponseTypes))
|
||||
}
|
||||
|
||||
// RestrictAdditionalAccessTokenScopes mocks base method.
|
||||
// RestrictAdditionalAccessTokenScopes mocks base method
|
||||
func (m *MockClient) RestrictAdditionalAccessTokenScopes() func([]string) []string {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "RestrictAdditionalAccessTokenScopes")
|
||||
|
@ -241,13 +239,13 @@ func (m *MockClient) RestrictAdditionalAccessTokenScopes() func([]string) []stri
|
|||
return ret0
|
||||
}
|
||||
|
||||
// RestrictAdditionalAccessTokenScopes indicates an expected call of RestrictAdditionalAccessTokenScopes.
|
||||
// RestrictAdditionalAccessTokenScopes indicates an expected call of RestrictAdditionalAccessTokenScopes
|
||||
func (mr *MockClientMockRecorder) RestrictAdditionalAccessTokenScopes() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestrictAdditionalAccessTokenScopes", reflect.TypeOf((*MockClient)(nil).RestrictAdditionalAccessTokenScopes))
|
||||
}
|
||||
|
||||
// RestrictAdditionalIdTokenScopes mocks base method.
|
||||
// RestrictAdditionalIdTokenScopes mocks base method
|
||||
func (m *MockClient) RestrictAdditionalIdTokenScopes() func([]string) []string {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "RestrictAdditionalIdTokenScopes")
|
||||
|
@ -255,7 +253,7 @@ func (m *MockClient) RestrictAdditionalIdTokenScopes() func([]string) []string {
|
|||
return ret0
|
||||
}
|
||||
|
||||
// RestrictAdditionalIdTokenScopes indicates an expected call of RestrictAdditionalIdTokenScopes.
|
||||
// RestrictAdditionalIdTokenScopes indicates an expected call of RestrictAdditionalIdTokenScopes
|
||||
func (mr *MockClientMockRecorder) RestrictAdditionalIdTokenScopes() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestrictAdditionalIdTokenScopes", reflect.TypeOf((*MockClient)(nil).RestrictAdditionalIdTokenScopes))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue