* WIP: mutator added, start working on validator * first validator iteration * second validator iteration * wip: working on integration tests * re-working mutation and validation, using Connection interface * fixing some rebase things * fixing integration tests * formatting * fixing unit tests * k8s codegen * linting * moving tests which are available only for enterprise * addressing comments: using repo config for connections, updating tests * addressing comments: adding some more info in the app and installation * fixing app data * addressing comments: updating connection implementation * addressing comments * formatting * fixing tests
150 lines
4.1 KiB
Go
150 lines
4.1 KiB
Go
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
|
|
|
package github
|
|
|
|
import (
|
|
context "context"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// MockClient is an autogenerated mock type for the Client type
|
|
type MockClient struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type MockClient_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *MockClient) EXPECT() *MockClient_Expecter {
|
|
return &MockClient_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// GetApp provides a mock function with given fields: ctx
|
|
func (_m *MockClient) GetApp(ctx context.Context) (App, error) {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetApp")
|
|
}
|
|
|
|
var r0 App
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context) (App, error)); ok {
|
|
return rf(ctx)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context) App); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
r0 = ret.Get(0).(App)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = rf(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClient_GetApp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetApp'
|
|
type MockClient_GetApp_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetApp is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *MockClient_Expecter) GetApp(ctx interface{}) *MockClient_GetApp_Call {
|
|
return &MockClient_GetApp_Call{Call: _e.mock.On("GetApp", ctx)}
|
|
}
|
|
|
|
func (_c *MockClient_GetApp_Call) Run(run func(ctx context.Context)) *MockClient_GetApp_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClient_GetApp_Call) Return(_a0 App, _a1 error) *MockClient_GetApp_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClient_GetApp_Call) RunAndReturn(run func(context.Context) (App, error)) *MockClient_GetApp_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetAppInstallation provides a mock function with given fields: ctx, installationID
|
|
func (_m *MockClient) GetAppInstallation(ctx context.Context, installationID string) (AppInstallation, error) {
|
|
ret := _m.Called(ctx, installationID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetAppInstallation")
|
|
}
|
|
|
|
var r0 AppInstallation
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) (AppInstallation, error)); ok {
|
|
return rf(ctx, installationID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) AppInstallation); ok {
|
|
r0 = rf(ctx, installationID)
|
|
} else {
|
|
r0 = ret.Get(0).(AppInstallation)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = rf(ctx, installationID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClient_GetAppInstallation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAppInstallation'
|
|
type MockClient_GetAppInstallation_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetAppInstallation is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - installationID string
|
|
func (_e *MockClient_Expecter) GetAppInstallation(ctx interface{}, installationID interface{}) *MockClient_GetAppInstallation_Call {
|
|
return &MockClient_GetAppInstallation_Call{Call: _e.mock.On("GetAppInstallation", ctx, installationID)}
|
|
}
|
|
|
|
func (_c *MockClient_GetAppInstallation_Call) Run(run func(ctx context.Context, installationID string)) *MockClient_GetAppInstallation_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClient_GetAppInstallation_Call) Return(_a0 AppInstallation, _a1 error) *MockClient_GetAppInstallation_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClient_GetAppInstallation_Call) RunAndReturn(run func(context.Context, string) (AppInstallation, error)) *MockClient_GetAppInstallation_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewMockClient(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MockClient {
|
|
mock := &MockClient{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|