mirror of
https://github.com/int128/kubelogin.git
synced 2026-05-19 14:26:34 +00:00
* Run go fmt * Generated by GitHub Actions (go / generate) https://github.com/int128/kubelogin/actions/runs/4971610724 --------- Co-authored-by: update-generated-files-action <41898282+github-actions[bot]@users.noreply.github.com>
89 lines
2.7 KiB
Go
89 lines
2.7 KiB
Go
// Code generated by mockery v2.13.1. DO NOT EDIT.
|
|
|
|
package client
|
|
|
|
import (
|
|
context "context"
|
|
|
|
oidc "github.com/int128/kubelogin/pkg/oidc"
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
tlsclientconfig "github.com/int128/kubelogin/pkg/tlsclientconfig"
|
|
)
|
|
|
|
// MockFactoryInterface is an autogenerated mock type for the FactoryInterface type
|
|
type MockFactoryInterface struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type MockFactoryInterface_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *MockFactoryInterface) EXPECT() *MockFactoryInterface_Expecter {
|
|
return &MockFactoryInterface_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// New provides a mock function with given fields: ctx, p, tlsClientConfig
|
|
func (_m *MockFactoryInterface) New(ctx context.Context, p oidc.Provider, tlsClientConfig tlsclientconfig.Config) (Interface, error) {
|
|
ret := _m.Called(ctx, p, tlsClientConfig)
|
|
|
|
var r0 Interface
|
|
if rf, ok := ret.Get(0).(func(context.Context, oidc.Provider, tlsclientconfig.Config) Interface); ok {
|
|
r0 = rf(ctx, p, tlsClientConfig)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(Interface)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, oidc.Provider, tlsclientconfig.Config) error); ok {
|
|
r1 = rf(ctx, p, tlsClientConfig)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockFactoryInterface_New_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'New'
|
|
type MockFactoryInterface_New_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// New is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - p oidc.Provider
|
|
// - tlsClientConfig tlsclientconfig.Config
|
|
func (_e *MockFactoryInterface_Expecter) New(ctx interface{}, p interface{}, tlsClientConfig interface{}) *MockFactoryInterface_New_Call {
|
|
return &MockFactoryInterface_New_Call{Call: _e.mock.On("New", ctx, p, tlsClientConfig)}
|
|
}
|
|
|
|
func (_c *MockFactoryInterface_New_Call) Run(run func(ctx context.Context, p oidc.Provider, tlsClientConfig tlsclientconfig.Config)) *MockFactoryInterface_New_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(oidc.Provider), args[2].(tlsclientconfig.Config))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockFactoryInterface_New_Call) Return(_a0 Interface, _a1 error) *MockFactoryInterface_New_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
type mockConstructorTestingTNewMockFactoryInterface interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}
|
|
|
|
// NewMockFactoryInterface creates a new instance of MockFactoryInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
func NewMockFactoryInterface(t mockConstructorTestingTNewMockFactoryInterface) *MockFactoryInterface {
|
|
mock := &MockFactoryInterface{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|