mirror of
https://github.com/hanzoai/cd.git
synced 2026-10-30 14:56:45 +00:00
clientgen/mockgen hadn't been rerun since the group rename, even though
pkg/apis/application/v1alpha1/doc.go and the shipped CRDs already say
apps.hanzo.ai. pkg/client/** still derived ArgoprojV1alpha1/Argoproj()
from the old argoproj.io group, and .mockery.yaml still named ArgoDB
(renamed to DB in util/db/db.go a few commits back) and
util/notification/cd (deleted in b2d7140a0, we use hanzoai/notify).
Reran clientgen (deepcopy-gen/client-gen/lister-gen/informer-gen) off
the current group, and mockgen after fixing .mockery.yaml. Moved every
hand-written call site that holds a versioned.Interface or
SharedInformerFactory with it: .ArgoprojV1alpha1() -> .AppsV1alpha1(),
ArgoprojV1alpha1Interface/Client -> AppsV1alpha1Interface/Client,
.Argoproj() -> .Apps() across controller, server, util, cmd,
hack/gen-resources, and test/e2e. controller/metrics/metrics_test.go's
mocks.NewArgoDB -> mocks.NewDB. Deleted the orphaned
util/db/mocks/ArgoDB.go; mockery writes DB.go for the renamed
interface but doesn't clean up the old filename on its own.
Left CHANGELOG.md/SECURITY.md's real argoproj/argo-cd history and
gitops-engine/pkg/diff/testdata/openapiv2.bin's Argo Rollouts OpenAPI
fixture untouched - genuine history and a real third-party schema, not
our naming.
go build/vet clean. Same 19 pre-existing package-level test failures
as baseline (missing git-verify-wrapper.sh, no live cluster, etc.),
none new. All 32 manifests/ kustomization paths still build;
manifests/ha/** untouched.
2850 lines
87 KiB
Go
Generated
2850 lines
87 KiB
Go
Generated
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/hanzoai/cd/pkg/apis/application/v1alpha1"
|
|
"github.com/hanzoai/cd/util/db"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// NewDB creates a new instance of DB. 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 NewDB(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *DB {
|
|
mock := &DB{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// DB is an autogenerated mock type for the DB type
|
|
type DB struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type DB_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *DB) EXPECT() *DB_Expecter {
|
|
return &DB_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// AddGPGPublicKey provides a mock function for the type DB
|
|
func (_mock *DB) AddGPGPublicKey(ctx context.Context, keyData string) (map[string]*v1alpha1.GnuPGPublicKey, []string, error) {
|
|
ret := _mock.Called(ctx, keyData)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AddGPGPublicKey")
|
|
}
|
|
|
|
var r0 map[string]*v1alpha1.GnuPGPublicKey
|
|
var r1 []string
|
|
var r2 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) (map[string]*v1alpha1.GnuPGPublicKey, []string, error)); ok {
|
|
return returnFunc(ctx, keyData)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) map[string]*v1alpha1.GnuPGPublicKey); ok {
|
|
r0 = returnFunc(ctx, keyData)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(map[string]*v1alpha1.GnuPGPublicKey)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string) []string); ok {
|
|
r1 = returnFunc(ctx, keyData)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).([]string)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(2).(func(context.Context, string) error); ok {
|
|
r2 = returnFunc(ctx, keyData)
|
|
} else {
|
|
r2 = ret.Error(2)
|
|
}
|
|
return r0, r1, r2
|
|
}
|
|
|
|
// DB_AddGPGPublicKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddGPGPublicKey'
|
|
type DB_AddGPGPublicKey_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AddGPGPublicKey is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - keyData string
|
|
func (_e *DB_Expecter) AddGPGPublicKey(ctx any, keyData any) *DB_AddGPGPublicKey_Call {
|
|
return &DB_AddGPGPublicKey_Call{Call: _e.mock.On("AddGPGPublicKey", ctx, keyData)}
|
|
}
|
|
|
|
func (_c *DB_AddGPGPublicKey_Call) Run(run func(ctx context.Context, keyData string)) *DB_AddGPGPublicKey_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_AddGPGPublicKey_Call) Return(stringToGnuPGPublicKey map[string]*v1alpha1.GnuPGPublicKey, strings []string, err error) *DB_AddGPGPublicKey_Call {
|
|
_c.Call.Return(stringToGnuPGPublicKey, strings, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_AddGPGPublicKey_Call) RunAndReturn(run func(ctx context.Context, keyData string) (map[string]*v1alpha1.GnuPGPublicKey, []string, error)) *DB_AddGPGPublicKey_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreateCluster provides a mock function for the type DB
|
|
func (_mock *DB) CreateCluster(ctx context.Context, c *v1alpha1.Cluster) (*v1alpha1.Cluster, error) {
|
|
ret := _mock.Called(ctx, c)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateCluster")
|
|
}
|
|
|
|
var r0 *v1alpha1.Cluster
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Cluster) (*v1alpha1.Cluster, error)); ok {
|
|
return returnFunc(ctx, c)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Cluster) *v1alpha1.Cluster); ok {
|
|
r0 = returnFunc(ctx, c)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.Cluster)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.Cluster) error); ok {
|
|
r1 = returnFunc(ctx, c)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_CreateCluster_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateCluster'
|
|
type DB_CreateCluster_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateCluster is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - c *v1alpha1.Cluster
|
|
func (_e *DB_Expecter) CreateCluster(ctx any, c any) *DB_CreateCluster_Call {
|
|
return &DB_CreateCluster_Call{Call: _e.mock.On("CreateCluster", ctx, c)}
|
|
}
|
|
|
|
func (_c *DB_CreateCluster_Call) Run(run func(ctx context.Context, c *v1alpha1.Cluster)) *DB_CreateCluster_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *v1alpha1.Cluster
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*v1alpha1.Cluster)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_CreateCluster_Call) Return(cluster *v1alpha1.Cluster, err error) *DB_CreateCluster_Call {
|
|
_c.Call.Return(cluster, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_CreateCluster_Call) RunAndReturn(run func(ctx context.Context, c *v1alpha1.Cluster) (*v1alpha1.Cluster, error)) *DB_CreateCluster_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreateRepoCertificate provides a mock function for the type DB
|
|
func (_mock *DB) CreateRepoCertificate(ctx context.Context, certificate *v1alpha1.RepositoryCertificateList, upsert bool) (*v1alpha1.RepositoryCertificateList, error) {
|
|
ret := _mock.Called(ctx, certificate, upsert)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateRepoCertificate")
|
|
}
|
|
|
|
var r0 *v1alpha1.RepositoryCertificateList
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepositoryCertificateList, bool) (*v1alpha1.RepositoryCertificateList, error)); ok {
|
|
return returnFunc(ctx, certificate, upsert)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepositoryCertificateList, bool) *v1alpha1.RepositoryCertificateList); ok {
|
|
r0 = returnFunc(ctx, certificate, upsert)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.RepositoryCertificateList)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepositoryCertificateList, bool) error); ok {
|
|
r1 = returnFunc(ctx, certificate, upsert)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_CreateRepoCertificate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRepoCertificate'
|
|
type DB_CreateRepoCertificate_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateRepoCertificate is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - certificate *v1alpha1.RepositoryCertificateList
|
|
// - upsert bool
|
|
func (_e *DB_Expecter) CreateRepoCertificate(ctx any, certificate any, upsert any) *DB_CreateRepoCertificate_Call {
|
|
return &DB_CreateRepoCertificate_Call{Call: _e.mock.On("CreateRepoCertificate", ctx, certificate, upsert)}
|
|
}
|
|
|
|
func (_c *DB_CreateRepoCertificate_Call) Run(run func(ctx context.Context, certificate *v1alpha1.RepositoryCertificateList, upsert bool)) *DB_CreateRepoCertificate_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *v1alpha1.RepositoryCertificateList
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*v1alpha1.RepositoryCertificateList)
|
|
}
|
|
var arg2 bool
|
|
if args[2] != nil {
|
|
arg2 = args[2].(bool)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_CreateRepoCertificate_Call) Return(repositoryCertificateList *v1alpha1.RepositoryCertificateList, err error) *DB_CreateRepoCertificate_Call {
|
|
_c.Call.Return(repositoryCertificateList, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_CreateRepoCertificate_Call) RunAndReturn(run func(ctx context.Context, certificate *v1alpha1.RepositoryCertificateList, upsert bool) (*v1alpha1.RepositoryCertificateList, error)) *DB_CreateRepoCertificate_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreateRepository provides a mock function for the type DB
|
|
func (_mock *DB) CreateRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) {
|
|
ret := _mock.Called(ctx, r)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateRepository")
|
|
}
|
|
|
|
var r0 *v1alpha1.Repository
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)); ok {
|
|
return returnFunc(ctx, r)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) *v1alpha1.Repository); ok {
|
|
r0 = returnFunc(ctx, r)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.Repository)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.Repository) error); ok {
|
|
r1 = returnFunc(ctx, r)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_CreateRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRepository'
|
|
type DB_CreateRepository_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateRepository is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - r *v1alpha1.Repository
|
|
func (_e *DB_Expecter) CreateRepository(ctx any, r any) *DB_CreateRepository_Call {
|
|
return &DB_CreateRepository_Call{Call: _e.mock.On("CreateRepository", ctx, r)}
|
|
}
|
|
|
|
func (_c *DB_CreateRepository_Call) Run(run func(ctx context.Context, r *v1alpha1.Repository)) *DB_CreateRepository_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *v1alpha1.Repository
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*v1alpha1.Repository)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_CreateRepository_Call) Return(repository *v1alpha1.Repository, err error) *DB_CreateRepository_Call {
|
|
_c.Call.Return(repository, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_CreateRepository_Call) RunAndReturn(run func(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error)) *DB_CreateRepository_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreateRepositoryCredentials provides a mock function for the type DB
|
|
func (_mock *DB) CreateRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) {
|
|
ret := _mock.Called(ctx, r)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateRepositoryCredentials")
|
|
}
|
|
|
|
var r0 *v1alpha1.RepoCreds
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)); ok {
|
|
return returnFunc(ctx, r)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) *v1alpha1.RepoCreds); ok {
|
|
r0 = returnFunc(ctx, r)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.RepoCreds)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepoCreds) error); ok {
|
|
r1 = returnFunc(ctx, r)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_CreateRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRepositoryCredentials'
|
|
type DB_CreateRepositoryCredentials_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateRepositoryCredentials is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - r *v1alpha1.RepoCreds
|
|
func (_e *DB_Expecter) CreateRepositoryCredentials(ctx any, r any) *DB_CreateRepositoryCredentials_Call {
|
|
return &DB_CreateRepositoryCredentials_Call{Call: _e.mock.On("CreateRepositoryCredentials", ctx, r)}
|
|
}
|
|
|
|
func (_c *DB_CreateRepositoryCredentials_Call) Run(run func(ctx context.Context, r *v1alpha1.RepoCreds)) *DB_CreateRepositoryCredentials_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *v1alpha1.RepoCreds
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*v1alpha1.RepoCreds)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_CreateRepositoryCredentials_Call) Return(repoCreds *v1alpha1.RepoCreds, err error) *DB_CreateRepositoryCredentials_Call {
|
|
_c.Call.Return(repoCreds, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_CreateRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)) *DB_CreateRepositoryCredentials_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreateWriteRepository provides a mock function for the type DB
|
|
func (_mock *DB) CreateWriteRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) {
|
|
ret := _mock.Called(ctx, r)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateWriteRepository")
|
|
}
|
|
|
|
var r0 *v1alpha1.Repository
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)); ok {
|
|
return returnFunc(ctx, r)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) *v1alpha1.Repository); ok {
|
|
r0 = returnFunc(ctx, r)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.Repository)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.Repository) error); ok {
|
|
r1 = returnFunc(ctx, r)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_CreateWriteRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateWriteRepository'
|
|
type DB_CreateWriteRepository_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateWriteRepository is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - r *v1alpha1.Repository
|
|
func (_e *DB_Expecter) CreateWriteRepository(ctx any, r any) *DB_CreateWriteRepository_Call {
|
|
return &DB_CreateWriteRepository_Call{Call: _e.mock.On("CreateWriteRepository", ctx, r)}
|
|
}
|
|
|
|
func (_c *DB_CreateWriteRepository_Call) Run(run func(ctx context.Context, r *v1alpha1.Repository)) *DB_CreateWriteRepository_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *v1alpha1.Repository
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*v1alpha1.Repository)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_CreateWriteRepository_Call) Return(repository *v1alpha1.Repository, err error) *DB_CreateWriteRepository_Call {
|
|
_c.Call.Return(repository, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_CreateWriteRepository_Call) RunAndReturn(run func(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error)) *DB_CreateWriteRepository_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreateWriteRepositoryCredentials provides a mock function for the type DB
|
|
func (_mock *DB) CreateWriteRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) {
|
|
ret := _mock.Called(ctx, r)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateWriteRepositoryCredentials")
|
|
}
|
|
|
|
var r0 *v1alpha1.RepoCreds
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)); ok {
|
|
return returnFunc(ctx, r)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) *v1alpha1.RepoCreds); ok {
|
|
r0 = returnFunc(ctx, r)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.RepoCreds)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepoCreds) error); ok {
|
|
r1 = returnFunc(ctx, r)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_CreateWriteRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateWriteRepositoryCredentials'
|
|
type DB_CreateWriteRepositoryCredentials_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateWriteRepositoryCredentials is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - r *v1alpha1.RepoCreds
|
|
func (_e *DB_Expecter) CreateWriteRepositoryCredentials(ctx any, r any) *DB_CreateWriteRepositoryCredentials_Call {
|
|
return &DB_CreateWriteRepositoryCredentials_Call{Call: _e.mock.On("CreateWriteRepositoryCredentials", ctx, r)}
|
|
}
|
|
|
|
func (_c *DB_CreateWriteRepositoryCredentials_Call) Run(run func(ctx context.Context, r *v1alpha1.RepoCreds)) *DB_CreateWriteRepositoryCredentials_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *v1alpha1.RepoCreds
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*v1alpha1.RepoCreds)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_CreateWriteRepositoryCredentials_Call) Return(repoCreds *v1alpha1.RepoCreds, err error) *DB_CreateWriteRepositoryCredentials_Call {
|
|
_c.Call.Return(repoCreds, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_CreateWriteRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)) *DB_CreateWriteRepositoryCredentials_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteCluster provides a mock function for the type DB
|
|
func (_mock *DB) DeleteCluster(ctx context.Context, server string) error {
|
|
ret := _mock.Called(ctx, server)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteCluster")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
|
r0 = returnFunc(ctx, server)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// DB_DeleteCluster_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCluster'
|
|
type DB_DeleteCluster_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteCluster is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - server string
|
|
func (_e *DB_Expecter) DeleteCluster(ctx any, server any) *DB_DeleteCluster_Call {
|
|
return &DB_DeleteCluster_Call{Call: _e.mock.On("DeleteCluster", ctx, server)}
|
|
}
|
|
|
|
func (_c *DB_DeleteCluster_Call) Run(run func(ctx context.Context, server string)) *DB_DeleteCluster_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_DeleteCluster_Call) Return(err error) *DB_DeleteCluster_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_DeleteCluster_Call) RunAndReturn(run func(ctx context.Context, server string) error) *DB_DeleteCluster_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteGPGPublicKey provides a mock function for the type DB
|
|
func (_mock *DB) DeleteGPGPublicKey(ctx context.Context, keyID string) error {
|
|
ret := _mock.Called(ctx, keyID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteGPGPublicKey")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
|
r0 = returnFunc(ctx, keyID)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// DB_DeleteGPGPublicKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteGPGPublicKey'
|
|
type DB_DeleteGPGPublicKey_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteGPGPublicKey is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - keyID string
|
|
func (_e *DB_Expecter) DeleteGPGPublicKey(ctx any, keyID any) *DB_DeleteGPGPublicKey_Call {
|
|
return &DB_DeleteGPGPublicKey_Call{Call: _e.mock.On("DeleteGPGPublicKey", ctx, keyID)}
|
|
}
|
|
|
|
func (_c *DB_DeleteGPGPublicKey_Call) Run(run func(ctx context.Context, keyID string)) *DB_DeleteGPGPublicKey_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_DeleteGPGPublicKey_Call) Return(err error) *DB_DeleteGPGPublicKey_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_DeleteGPGPublicKey_Call) RunAndReturn(run func(ctx context.Context, keyID string) error) *DB_DeleteGPGPublicKey_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteRepository provides a mock function for the type DB
|
|
func (_mock *DB) DeleteRepository(ctx context.Context, name string, project string) error {
|
|
ret := _mock.Called(ctx, name, project)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteRepository")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
|
|
r0 = returnFunc(ctx, name, project)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// DB_DeleteRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRepository'
|
|
type DB_DeleteRepository_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteRepository is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - name string
|
|
// - project string
|
|
func (_e *DB_Expecter) DeleteRepository(ctx any, name any, project any) *DB_DeleteRepository_Call {
|
|
return &DB_DeleteRepository_Call{Call: _e.mock.On("DeleteRepository", ctx, name, project)}
|
|
}
|
|
|
|
func (_c *DB_DeleteRepository_Call) Run(run func(ctx context.Context, name string, project string)) *DB_DeleteRepository_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_DeleteRepository_Call) Return(err error) *DB_DeleteRepository_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_DeleteRepository_Call) RunAndReturn(run func(ctx context.Context, name string, project string) error) *DB_DeleteRepository_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteRepositoryCredentials provides a mock function for the type DB
|
|
func (_mock *DB) DeleteRepositoryCredentials(ctx context.Context, name string) error {
|
|
ret := _mock.Called(ctx, name)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteRepositoryCredentials")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
|
r0 = returnFunc(ctx, name)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// DB_DeleteRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRepositoryCredentials'
|
|
type DB_DeleteRepositoryCredentials_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteRepositoryCredentials is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - name string
|
|
func (_e *DB_Expecter) DeleteRepositoryCredentials(ctx any, name any) *DB_DeleteRepositoryCredentials_Call {
|
|
return &DB_DeleteRepositoryCredentials_Call{Call: _e.mock.On("DeleteRepositoryCredentials", ctx, name)}
|
|
}
|
|
|
|
func (_c *DB_DeleteRepositoryCredentials_Call) Run(run func(ctx context.Context, name string)) *DB_DeleteRepositoryCredentials_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_DeleteRepositoryCredentials_Call) Return(err error) *DB_DeleteRepositoryCredentials_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_DeleteRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context, name string) error) *DB_DeleteRepositoryCredentials_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteWriteRepository provides a mock function for the type DB
|
|
func (_mock *DB) DeleteWriteRepository(ctx context.Context, name string, project string) error {
|
|
ret := _mock.Called(ctx, name, project)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteWriteRepository")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
|
|
r0 = returnFunc(ctx, name, project)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// DB_DeleteWriteRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteWriteRepository'
|
|
type DB_DeleteWriteRepository_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteWriteRepository is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - name string
|
|
// - project string
|
|
func (_e *DB_Expecter) DeleteWriteRepository(ctx any, name any, project any) *DB_DeleteWriteRepository_Call {
|
|
return &DB_DeleteWriteRepository_Call{Call: _e.mock.On("DeleteWriteRepository", ctx, name, project)}
|
|
}
|
|
|
|
func (_c *DB_DeleteWriteRepository_Call) Run(run func(ctx context.Context, name string, project string)) *DB_DeleteWriteRepository_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_DeleteWriteRepository_Call) Return(err error) *DB_DeleteWriteRepository_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_DeleteWriteRepository_Call) RunAndReturn(run func(ctx context.Context, name string, project string) error) *DB_DeleteWriteRepository_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteWriteRepositoryCredentials provides a mock function for the type DB
|
|
func (_mock *DB) DeleteWriteRepositoryCredentials(ctx context.Context, name string) error {
|
|
ret := _mock.Called(ctx, name)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteWriteRepositoryCredentials")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
|
r0 = returnFunc(ctx, name)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// DB_DeleteWriteRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteWriteRepositoryCredentials'
|
|
type DB_DeleteWriteRepositoryCredentials_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteWriteRepositoryCredentials is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - name string
|
|
func (_e *DB_Expecter) DeleteWriteRepositoryCredentials(ctx any, name any) *DB_DeleteWriteRepositoryCredentials_Call {
|
|
return &DB_DeleteWriteRepositoryCredentials_Call{Call: _e.mock.On("DeleteWriteRepositoryCredentials", ctx, name)}
|
|
}
|
|
|
|
func (_c *DB_DeleteWriteRepositoryCredentials_Call) Run(run func(ctx context.Context, name string)) *DB_DeleteWriteRepositoryCredentials_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_DeleteWriteRepositoryCredentials_Call) Return(err error) *DB_DeleteWriteRepositoryCredentials_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_DeleteWriteRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context, name string) error) *DB_DeleteWriteRepositoryCredentials_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetAllHelmRepositoryCredentials provides a mock function for the type DB
|
|
func (_mock *DB) GetAllHelmRepositoryCredentials(ctx context.Context) ([]*v1alpha1.RepoCreds, error) {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetAllHelmRepositoryCredentials")
|
|
}
|
|
|
|
var r0 []*v1alpha1.RepoCreds
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.RepoCreds, error)); ok {
|
|
return returnFunc(ctx)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) []*v1alpha1.RepoCreds); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*v1alpha1.RepoCreds)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = returnFunc(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_GetAllHelmRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllHelmRepositoryCredentials'
|
|
type DB_GetAllHelmRepositoryCredentials_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetAllHelmRepositoryCredentials is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *DB_Expecter) GetAllHelmRepositoryCredentials(ctx any) *DB_GetAllHelmRepositoryCredentials_Call {
|
|
return &DB_GetAllHelmRepositoryCredentials_Call{Call: _e.mock.On("GetAllHelmRepositoryCredentials", ctx)}
|
|
}
|
|
|
|
func (_c *DB_GetAllHelmRepositoryCredentials_Call) Run(run func(ctx context.Context)) *DB_GetAllHelmRepositoryCredentials_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetAllHelmRepositoryCredentials_Call) Return(repoCredss []*v1alpha1.RepoCreds, err error) *DB_GetAllHelmRepositoryCredentials_Call {
|
|
_c.Call.Return(repoCredss, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetAllHelmRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context) ([]*v1alpha1.RepoCreds, error)) *DB_GetAllHelmRepositoryCredentials_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetAllOCIRepositoryCredentials provides a mock function for the type DB
|
|
func (_mock *DB) GetAllOCIRepositoryCredentials(ctx context.Context) ([]*v1alpha1.RepoCreds, error) {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetAllOCIRepositoryCredentials")
|
|
}
|
|
|
|
var r0 []*v1alpha1.RepoCreds
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.RepoCreds, error)); ok {
|
|
return returnFunc(ctx)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) []*v1alpha1.RepoCreds); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*v1alpha1.RepoCreds)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = returnFunc(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_GetAllOCIRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllOCIRepositoryCredentials'
|
|
type DB_GetAllOCIRepositoryCredentials_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetAllOCIRepositoryCredentials is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *DB_Expecter) GetAllOCIRepositoryCredentials(ctx any) *DB_GetAllOCIRepositoryCredentials_Call {
|
|
return &DB_GetAllOCIRepositoryCredentials_Call{Call: _e.mock.On("GetAllOCIRepositoryCredentials", ctx)}
|
|
}
|
|
|
|
func (_c *DB_GetAllOCIRepositoryCredentials_Call) Run(run func(ctx context.Context)) *DB_GetAllOCIRepositoryCredentials_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetAllOCIRepositoryCredentials_Call) Return(repoCredss []*v1alpha1.RepoCreds, err error) *DB_GetAllOCIRepositoryCredentials_Call {
|
|
_c.Call.Return(repoCredss, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetAllOCIRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context) ([]*v1alpha1.RepoCreds, error)) *DB_GetAllOCIRepositoryCredentials_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetApplicationControllerReplicas provides a mock function for the type DB
|
|
func (_mock *DB) GetApplicationControllerReplicas() int {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetApplicationControllerReplicas")
|
|
}
|
|
|
|
var r0 int
|
|
if returnFunc, ok := ret.Get(0).(func() int); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
r0 = ret.Get(0).(int)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// DB_GetApplicationControllerReplicas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetApplicationControllerReplicas'
|
|
type DB_GetApplicationControllerReplicas_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetApplicationControllerReplicas is a helper method to define mock.On call
|
|
func (_e *DB_Expecter) GetApplicationControllerReplicas() *DB_GetApplicationControllerReplicas_Call {
|
|
return &DB_GetApplicationControllerReplicas_Call{Call: _e.mock.On("GetApplicationControllerReplicas")}
|
|
}
|
|
|
|
func (_c *DB_GetApplicationControllerReplicas_Call) Run(run func()) *DB_GetApplicationControllerReplicas_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetApplicationControllerReplicas_Call) Return(n int) *DB_GetApplicationControllerReplicas_Call {
|
|
_c.Call.Return(n)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetApplicationControllerReplicas_Call) RunAndReturn(run func() int) *DB_GetApplicationControllerReplicas_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetCluster provides a mock function for the type DB
|
|
func (_mock *DB) GetCluster(ctx context.Context, server string) (*v1alpha1.Cluster, error) {
|
|
ret := _mock.Called(ctx, server)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetCluster")
|
|
}
|
|
|
|
var r0 *v1alpha1.Cluster
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.Cluster, error)); ok {
|
|
return returnFunc(ctx, server)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.Cluster); ok {
|
|
r0 = returnFunc(ctx, server)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.Cluster)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = returnFunc(ctx, server)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_GetCluster_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCluster'
|
|
type DB_GetCluster_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetCluster is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - server string
|
|
func (_e *DB_Expecter) GetCluster(ctx any, server any) *DB_GetCluster_Call {
|
|
return &DB_GetCluster_Call{Call: _e.mock.On("GetCluster", ctx, server)}
|
|
}
|
|
|
|
func (_c *DB_GetCluster_Call) Run(run func(ctx context.Context, server string)) *DB_GetCluster_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetCluster_Call) Return(cluster *v1alpha1.Cluster, err error) *DB_GetCluster_Call {
|
|
_c.Call.Return(cluster, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetCluster_Call) RunAndReturn(run func(ctx context.Context, server string) (*v1alpha1.Cluster, error)) *DB_GetCluster_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetClusterServersByName provides a mock function for the type DB
|
|
func (_mock *DB) GetClusterServersByName(ctx context.Context, name string) ([]string, error) {
|
|
ret := _mock.Called(ctx, name)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetClusterServersByName")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok {
|
|
return returnFunc(ctx, name)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) []string); ok {
|
|
r0 = returnFunc(ctx, name)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = returnFunc(ctx, name)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_GetClusterServersByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClusterServersByName'
|
|
type DB_GetClusterServersByName_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetClusterServersByName is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - name string
|
|
func (_e *DB_Expecter) GetClusterServersByName(ctx any, name any) *DB_GetClusterServersByName_Call {
|
|
return &DB_GetClusterServersByName_Call{Call: _e.mock.On("GetClusterServersByName", ctx, name)}
|
|
}
|
|
|
|
func (_c *DB_GetClusterServersByName_Call) Run(run func(ctx context.Context, name string)) *DB_GetClusterServersByName_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetClusterServersByName_Call) Return(strings []string, err error) *DB_GetClusterServersByName_Call {
|
|
_c.Call.Return(strings, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetClusterServersByName_Call) RunAndReturn(run func(ctx context.Context, name string) ([]string, error)) *DB_GetClusterServersByName_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetProjectClusters provides a mock function for the type DB
|
|
func (_mock *DB) GetProjectClusters(ctx context.Context, project string) ([]*v1alpha1.Cluster, error) {
|
|
ret := _mock.Called(ctx, project)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetProjectClusters")
|
|
}
|
|
|
|
var r0 []*v1alpha1.Cluster
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]*v1alpha1.Cluster, error)); ok {
|
|
return returnFunc(ctx, project)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) []*v1alpha1.Cluster); ok {
|
|
r0 = returnFunc(ctx, project)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*v1alpha1.Cluster)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = returnFunc(ctx, project)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_GetProjectClusters_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProjectClusters'
|
|
type DB_GetProjectClusters_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetProjectClusters is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - project string
|
|
func (_e *DB_Expecter) GetProjectClusters(ctx any, project any) *DB_GetProjectClusters_Call {
|
|
return &DB_GetProjectClusters_Call{Call: _e.mock.On("GetProjectClusters", ctx, project)}
|
|
}
|
|
|
|
func (_c *DB_GetProjectClusters_Call) Run(run func(ctx context.Context, project string)) *DB_GetProjectClusters_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetProjectClusters_Call) Return(clusters []*v1alpha1.Cluster, err error) *DB_GetProjectClusters_Call {
|
|
_c.Call.Return(clusters, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetProjectClusters_Call) RunAndReturn(run func(ctx context.Context, project string) ([]*v1alpha1.Cluster, error)) *DB_GetProjectClusters_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetProjectRepositories provides a mock function for the type DB
|
|
func (_mock *DB) GetProjectRepositories(project string) ([]*v1alpha1.Repository, error) {
|
|
ret := _mock.Called(project)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetProjectRepositories")
|
|
}
|
|
|
|
var r0 []*v1alpha1.Repository
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(string) ([]*v1alpha1.Repository, error)); ok {
|
|
return returnFunc(project)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(string) []*v1alpha1.Repository); ok {
|
|
r0 = returnFunc(project)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*v1alpha1.Repository)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = returnFunc(project)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_GetProjectRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProjectRepositories'
|
|
type DB_GetProjectRepositories_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetProjectRepositories is a helper method to define mock.On call
|
|
// - project string
|
|
func (_e *DB_Expecter) GetProjectRepositories(project any) *DB_GetProjectRepositories_Call {
|
|
return &DB_GetProjectRepositories_Call{Call: _e.mock.On("GetProjectRepositories", project)}
|
|
}
|
|
|
|
func (_c *DB_GetProjectRepositories_Call) Run(run func(project string)) *DB_GetProjectRepositories_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 string
|
|
if args[0] != nil {
|
|
arg0 = args[0].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetProjectRepositories_Call) Return(repositorys []*v1alpha1.Repository, err error) *DB_GetProjectRepositories_Call {
|
|
_c.Call.Return(repositorys, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetProjectRepositories_Call) RunAndReturn(run func(project string) ([]*v1alpha1.Repository, error)) *DB_GetProjectRepositories_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetProjectWriteRepositories provides a mock function for the type DB
|
|
func (_mock *DB) GetProjectWriteRepositories(project string) ([]*v1alpha1.Repository, error) {
|
|
ret := _mock.Called(project)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetProjectWriteRepositories")
|
|
}
|
|
|
|
var r0 []*v1alpha1.Repository
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(string) ([]*v1alpha1.Repository, error)); ok {
|
|
return returnFunc(project)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(string) []*v1alpha1.Repository); ok {
|
|
r0 = returnFunc(project)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*v1alpha1.Repository)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = returnFunc(project)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_GetProjectWriteRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProjectWriteRepositories'
|
|
type DB_GetProjectWriteRepositories_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetProjectWriteRepositories is a helper method to define mock.On call
|
|
// - project string
|
|
func (_e *DB_Expecter) GetProjectWriteRepositories(project any) *DB_GetProjectWriteRepositories_Call {
|
|
return &DB_GetProjectWriteRepositories_Call{Call: _e.mock.On("GetProjectWriteRepositories", project)}
|
|
}
|
|
|
|
func (_c *DB_GetProjectWriteRepositories_Call) Run(run func(project string)) *DB_GetProjectWriteRepositories_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 string
|
|
if args[0] != nil {
|
|
arg0 = args[0].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetProjectWriteRepositories_Call) Return(repositorys []*v1alpha1.Repository, err error) *DB_GetProjectWriteRepositories_Call {
|
|
_c.Call.Return(repositorys, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetProjectWriteRepositories_Call) RunAndReturn(run func(project string) ([]*v1alpha1.Repository, error)) *DB_GetProjectWriteRepositories_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetRepository provides a mock function for the type DB
|
|
func (_mock *DB) GetRepository(ctx context.Context, url string, project string) (*v1alpha1.Repository, error) {
|
|
ret := _mock.Called(ctx, url, project)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetRepository")
|
|
}
|
|
|
|
var r0 *v1alpha1.Repository
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*v1alpha1.Repository, error)); ok {
|
|
return returnFunc(ctx, url, project)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *v1alpha1.Repository); ok {
|
|
r0 = returnFunc(ctx, url, project)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.Repository)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
|
r1 = returnFunc(ctx, url, project)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_GetRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepository'
|
|
type DB_GetRepository_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetRepository is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - url string
|
|
// - project string
|
|
func (_e *DB_Expecter) GetRepository(ctx any, url any, project any) *DB_GetRepository_Call {
|
|
return &DB_GetRepository_Call{Call: _e.mock.On("GetRepository", ctx, url, project)}
|
|
}
|
|
|
|
func (_c *DB_GetRepository_Call) Run(run func(ctx context.Context, url string, project string)) *DB_GetRepository_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetRepository_Call) Return(repository *v1alpha1.Repository, err error) *DB_GetRepository_Call {
|
|
_c.Call.Return(repository, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetRepository_Call) RunAndReturn(run func(ctx context.Context, url string, project string) (*v1alpha1.Repository, error)) *DB_GetRepository_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetRepositoryCredentials provides a mock function for the type DB
|
|
func (_mock *DB) GetRepositoryCredentials(ctx context.Context, name string) (*v1alpha1.RepoCreds, error) {
|
|
ret := _mock.Called(ctx, name)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetRepositoryCredentials")
|
|
}
|
|
|
|
var r0 *v1alpha1.RepoCreds
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.RepoCreds, error)); ok {
|
|
return returnFunc(ctx, name)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.RepoCreds); ok {
|
|
r0 = returnFunc(ctx, name)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.RepoCreds)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = returnFunc(ctx, name)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_GetRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepositoryCredentials'
|
|
type DB_GetRepositoryCredentials_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetRepositoryCredentials is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - name string
|
|
func (_e *DB_Expecter) GetRepositoryCredentials(ctx any, name any) *DB_GetRepositoryCredentials_Call {
|
|
return &DB_GetRepositoryCredentials_Call{Call: _e.mock.On("GetRepositoryCredentials", ctx, name)}
|
|
}
|
|
|
|
func (_c *DB_GetRepositoryCredentials_Call) Run(run func(ctx context.Context, name string)) *DB_GetRepositoryCredentials_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetRepositoryCredentials_Call) Return(repoCreds *v1alpha1.RepoCreds, err error) *DB_GetRepositoryCredentials_Call {
|
|
_c.Call.Return(repoCreds, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context, name string) (*v1alpha1.RepoCreds, error)) *DB_GetRepositoryCredentials_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetWriteRepository provides a mock function for the type DB
|
|
func (_mock *DB) GetWriteRepository(ctx context.Context, url string, project string) (*v1alpha1.Repository, error) {
|
|
ret := _mock.Called(ctx, url, project)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetWriteRepository")
|
|
}
|
|
|
|
var r0 *v1alpha1.Repository
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*v1alpha1.Repository, error)); ok {
|
|
return returnFunc(ctx, url, project)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *v1alpha1.Repository); ok {
|
|
r0 = returnFunc(ctx, url, project)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.Repository)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
|
r1 = returnFunc(ctx, url, project)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_GetWriteRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWriteRepository'
|
|
type DB_GetWriteRepository_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetWriteRepository is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - url string
|
|
// - project string
|
|
func (_e *DB_Expecter) GetWriteRepository(ctx any, url any, project any) *DB_GetWriteRepository_Call {
|
|
return &DB_GetWriteRepository_Call{Call: _e.mock.On("GetWriteRepository", ctx, url, project)}
|
|
}
|
|
|
|
func (_c *DB_GetWriteRepository_Call) Run(run func(ctx context.Context, url string, project string)) *DB_GetWriteRepository_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetWriteRepository_Call) Return(repository *v1alpha1.Repository, err error) *DB_GetWriteRepository_Call {
|
|
_c.Call.Return(repository, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetWriteRepository_Call) RunAndReturn(run func(ctx context.Context, url string, project string) (*v1alpha1.Repository, error)) *DB_GetWriteRepository_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetWriteRepositoryCredentials provides a mock function for the type DB
|
|
func (_mock *DB) GetWriteRepositoryCredentials(ctx context.Context, name string) (*v1alpha1.RepoCreds, error) {
|
|
ret := _mock.Called(ctx, name)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetWriteRepositoryCredentials")
|
|
}
|
|
|
|
var r0 *v1alpha1.RepoCreds
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.RepoCreds, error)); ok {
|
|
return returnFunc(ctx, name)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.RepoCreds); ok {
|
|
r0 = returnFunc(ctx, name)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.RepoCreds)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = returnFunc(ctx, name)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_GetWriteRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWriteRepositoryCredentials'
|
|
type DB_GetWriteRepositoryCredentials_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetWriteRepositoryCredentials is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - name string
|
|
func (_e *DB_Expecter) GetWriteRepositoryCredentials(ctx any, name any) *DB_GetWriteRepositoryCredentials_Call {
|
|
return &DB_GetWriteRepositoryCredentials_Call{Call: _e.mock.On("GetWriteRepositoryCredentials", ctx, name)}
|
|
}
|
|
|
|
func (_c *DB_GetWriteRepositoryCredentials_Call) Run(run func(ctx context.Context, name string)) *DB_GetWriteRepositoryCredentials_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetWriteRepositoryCredentials_Call) Return(repoCreds *v1alpha1.RepoCreds, err error) *DB_GetWriteRepositoryCredentials_Call {
|
|
_c.Call.Return(repoCreds, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_GetWriteRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context, name string) (*v1alpha1.RepoCreds, error)) *DB_GetWriteRepositoryCredentials_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListClusters provides a mock function for the type DB
|
|
func (_mock *DB) ListClusters(ctx context.Context) (*v1alpha1.ClusterList, error) {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListClusters")
|
|
}
|
|
|
|
var r0 *v1alpha1.ClusterList
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) (*v1alpha1.ClusterList, error)); ok {
|
|
return returnFunc(ctx)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) *v1alpha1.ClusterList); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.ClusterList)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = returnFunc(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_ListClusters_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListClusters'
|
|
type DB_ListClusters_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListClusters is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *DB_Expecter) ListClusters(ctx any) *DB_ListClusters_Call {
|
|
return &DB_ListClusters_Call{Call: _e.mock.On("ListClusters", ctx)}
|
|
}
|
|
|
|
func (_c *DB_ListClusters_Call) Run(run func(ctx context.Context)) *DB_ListClusters_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListClusters_Call) Return(clusterList *v1alpha1.ClusterList, err error) *DB_ListClusters_Call {
|
|
_c.Call.Return(clusterList, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListClusters_Call) RunAndReturn(run func(ctx context.Context) (*v1alpha1.ClusterList, error)) *DB_ListClusters_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListConfiguredGPGPublicKeys provides a mock function for the type DB
|
|
func (_mock *DB) ListConfiguredGPGPublicKeys(ctx context.Context) (map[string]*v1alpha1.GnuPGPublicKey, error) {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListConfiguredGPGPublicKeys")
|
|
}
|
|
|
|
var r0 map[string]*v1alpha1.GnuPGPublicKey
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) (map[string]*v1alpha1.GnuPGPublicKey, error)); ok {
|
|
return returnFunc(ctx)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) map[string]*v1alpha1.GnuPGPublicKey); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(map[string]*v1alpha1.GnuPGPublicKey)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = returnFunc(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_ListConfiguredGPGPublicKeys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListConfiguredGPGPublicKeys'
|
|
type DB_ListConfiguredGPGPublicKeys_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListConfiguredGPGPublicKeys is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *DB_Expecter) ListConfiguredGPGPublicKeys(ctx any) *DB_ListConfiguredGPGPublicKeys_Call {
|
|
return &DB_ListConfiguredGPGPublicKeys_Call{Call: _e.mock.On("ListConfiguredGPGPublicKeys", ctx)}
|
|
}
|
|
|
|
func (_c *DB_ListConfiguredGPGPublicKeys_Call) Run(run func(ctx context.Context)) *DB_ListConfiguredGPGPublicKeys_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListConfiguredGPGPublicKeys_Call) Return(stringToGnuPGPublicKey map[string]*v1alpha1.GnuPGPublicKey, err error) *DB_ListConfiguredGPGPublicKeys_Call {
|
|
_c.Call.Return(stringToGnuPGPublicKey, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListConfiguredGPGPublicKeys_Call) RunAndReturn(run func(ctx context.Context) (map[string]*v1alpha1.GnuPGPublicKey, error)) *DB_ListConfiguredGPGPublicKeys_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListHelmRepositories provides a mock function for the type DB
|
|
func (_mock *DB) ListHelmRepositories(ctx context.Context) ([]*v1alpha1.Repository, error) {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListHelmRepositories")
|
|
}
|
|
|
|
var r0 []*v1alpha1.Repository
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.Repository, error)); ok {
|
|
return returnFunc(ctx)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) []*v1alpha1.Repository); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*v1alpha1.Repository)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = returnFunc(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_ListHelmRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListHelmRepositories'
|
|
type DB_ListHelmRepositories_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListHelmRepositories is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *DB_Expecter) ListHelmRepositories(ctx any) *DB_ListHelmRepositories_Call {
|
|
return &DB_ListHelmRepositories_Call{Call: _e.mock.On("ListHelmRepositories", ctx)}
|
|
}
|
|
|
|
func (_c *DB_ListHelmRepositories_Call) Run(run func(ctx context.Context)) *DB_ListHelmRepositories_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListHelmRepositories_Call) Return(repositorys []*v1alpha1.Repository, err error) *DB_ListHelmRepositories_Call {
|
|
_c.Call.Return(repositorys, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListHelmRepositories_Call) RunAndReturn(run func(ctx context.Context) ([]*v1alpha1.Repository, error)) *DB_ListHelmRepositories_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListOCIRepositories provides a mock function for the type DB
|
|
func (_mock *DB) ListOCIRepositories(ctx context.Context) ([]*v1alpha1.Repository, error) {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListOCIRepositories")
|
|
}
|
|
|
|
var r0 []*v1alpha1.Repository
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.Repository, error)); ok {
|
|
return returnFunc(ctx)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) []*v1alpha1.Repository); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*v1alpha1.Repository)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = returnFunc(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_ListOCIRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListOCIRepositories'
|
|
type DB_ListOCIRepositories_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListOCIRepositories is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *DB_Expecter) ListOCIRepositories(ctx any) *DB_ListOCIRepositories_Call {
|
|
return &DB_ListOCIRepositories_Call{Call: _e.mock.On("ListOCIRepositories", ctx)}
|
|
}
|
|
|
|
func (_c *DB_ListOCIRepositories_Call) Run(run func(ctx context.Context)) *DB_ListOCIRepositories_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListOCIRepositories_Call) Return(repositorys []*v1alpha1.Repository, err error) *DB_ListOCIRepositories_Call {
|
|
_c.Call.Return(repositorys, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListOCIRepositories_Call) RunAndReturn(run func(ctx context.Context) ([]*v1alpha1.Repository, error)) *DB_ListOCIRepositories_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListRepoCertificates provides a mock function for the type DB
|
|
func (_mock *DB) ListRepoCertificates(ctx context.Context, selector *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error) {
|
|
ret := _mock.Called(ctx, selector)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListRepoCertificates")
|
|
}
|
|
|
|
var r0 *v1alpha1.RepositoryCertificateList
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error)); ok {
|
|
return returnFunc(ctx, selector)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *db.CertificateListSelector) *v1alpha1.RepositoryCertificateList); ok {
|
|
r0 = returnFunc(ctx, selector)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.RepositoryCertificateList)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *db.CertificateListSelector) error); ok {
|
|
r1 = returnFunc(ctx, selector)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_ListRepoCertificates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRepoCertificates'
|
|
type DB_ListRepoCertificates_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListRepoCertificates is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - selector *db.CertificateListSelector
|
|
func (_e *DB_Expecter) ListRepoCertificates(ctx any, selector any) *DB_ListRepoCertificates_Call {
|
|
return &DB_ListRepoCertificates_Call{Call: _e.mock.On("ListRepoCertificates", ctx, selector)}
|
|
}
|
|
|
|
func (_c *DB_ListRepoCertificates_Call) Run(run func(ctx context.Context, selector *db.CertificateListSelector)) *DB_ListRepoCertificates_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *db.CertificateListSelector
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*db.CertificateListSelector)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListRepoCertificates_Call) Return(repositoryCertificateList *v1alpha1.RepositoryCertificateList, err error) *DB_ListRepoCertificates_Call {
|
|
_c.Call.Return(repositoryCertificateList, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListRepoCertificates_Call) RunAndReturn(run func(ctx context.Context, selector *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error)) *DB_ListRepoCertificates_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListRepositories provides a mock function for the type DB
|
|
func (_mock *DB) ListRepositories(ctx context.Context) ([]*v1alpha1.Repository, error) {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListRepositories")
|
|
}
|
|
|
|
var r0 []*v1alpha1.Repository
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.Repository, error)); ok {
|
|
return returnFunc(ctx)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) []*v1alpha1.Repository); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*v1alpha1.Repository)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = returnFunc(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_ListRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRepositories'
|
|
type DB_ListRepositories_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListRepositories is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *DB_Expecter) ListRepositories(ctx any) *DB_ListRepositories_Call {
|
|
return &DB_ListRepositories_Call{Call: _e.mock.On("ListRepositories", ctx)}
|
|
}
|
|
|
|
func (_c *DB_ListRepositories_Call) Run(run func(ctx context.Context)) *DB_ListRepositories_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListRepositories_Call) Return(repositorys []*v1alpha1.Repository, err error) *DB_ListRepositories_Call {
|
|
_c.Call.Return(repositorys, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListRepositories_Call) RunAndReturn(run func(ctx context.Context) ([]*v1alpha1.Repository, error)) *DB_ListRepositories_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListRepositoryCredentials provides a mock function for the type DB
|
|
func (_mock *DB) ListRepositoryCredentials(ctx context.Context) ([]string, error) {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListRepositoryCredentials")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
|
|
return returnFunc(ctx)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = returnFunc(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_ListRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRepositoryCredentials'
|
|
type DB_ListRepositoryCredentials_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListRepositoryCredentials is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *DB_Expecter) ListRepositoryCredentials(ctx any) *DB_ListRepositoryCredentials_Call {
|
|
return &DB_ListRepositoryCredentials_Call{Call: _e.mock.On("ListRepositoryCredentials", ctx)}
|
|
}
|
|
|
|
func (_c *DB_ListRepositoryCredentials_Call) Run(run func(ctx context.Context)) *DB_ListRepositoryCredentials_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListRepositoryCredentials_Call) Return(strings []string, err error) *DB_ListRepositoryCredentials_Call {
|
|
_c.Call.Return(strings, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *DB_ListRepositoryCredentials_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListWriteRepositories provides a mock function for the type DB
|
|
func (_mock *DB) ListWriteRepositories(ctx context.Context) ([]*v1alpha1.Repository, error) {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListWriteRepositories")
|
|
}
|
|
|
|
var r0 []*v1alpha1.Repository
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.Repository, error)); ok {
|
|
return returnFunc(ctx)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) []*v1alpha1.Repository); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*v1alpha1.Repository)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = returnFunc(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_ListWriteRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListWriteRepositories'
|
|
type DB_ListWriteRepositories_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListWriteRepositories is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *DB_Expecter) ListWriteRepositories(ctx any) *DB_ListWriteRepositories_Call {
|
|
return &DB_ListWriteRepositories_Call{Call: _e.mock.On("ListWriteRepositories", ctx)}
|
|
}
|
|
|
|
func (_c *DB_ListWriteRepositories_Call) Run(run func(ctx context.Context)) *DB_ListWriteRepositories_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListWriteRepositories_Call) Return(repositorys []*v1alpha1.Repository, err error) *DB_ListWriteRepositories_Call {
|
|
_c.Call.Return(repositorys, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListWriteRepositories_Call) RunAndReturn(run func(ctx context.Context) ([]*v1alpha1.Repository, error)) *DB_ListWriteRepositories_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListWriteRepositoryCredentials provides a mock function for the type DB
|
|
func (_mock *DB) ListWriteRepositoryCredentials(ctx context.Context) ([]string, error) {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListWriteRepositoryCredentials")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
|
|
return returnFunc(ctx)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = returnFunc(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_ListWriteRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListWriteRepositoryCredentials'
|
|
type DB_ListWriteRepositoryCredentials_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListWriteRepositoryCredentials is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *DB_Expecter) ListWriteRepositoryCredentials(ctx any) *DB_ListWriteRepositoryCredentials_Call {
|
|
return &DB_ListWriteRepositoryCredentials_Call{Call: _e.mock.On("ListWriteRepositoryCredentials", ctx)}
|
|
}
|
|
|
|
func (_c *DB_ListWriteRepositoryCredentials_Call) Run(run func(ctx context.Context)) *DB_ListWriteRepositoryCredentials_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListWriteRepositoryCredentials_Call) Return(strings []string, err error) *DB_ListWriteRepositoryCredentials_Call {
|
|
_c.Call.Return(strings, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_ListWriteRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *DB_ListWriteRepositoryCredentials_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RemoveRepoCertificates provides a mock function for the type DB
|
|
func (_mock *DB) RemoveRepoCertificates(ctx context.Context, selector *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error) {
|
|
ret := _mock.Called(ctx, selector)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RemoveRepoCertificates")
|
|
}
|
|
|
|
var r0 *v1alpha1.RepositoryCertificateList
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error)); ok {
|
|
return returnFunc(ctx, selector)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *db.CertificateListSelector) *v1alpha1.RepositoryCertificateList); ok {
|
|
r0 = returnFunc(ctx, selector)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.RepositoryCertificateList)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *db.CertificateListSelector) error); ok {
|
|
r1 = returnFunc(ctx, selector)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_RemoveRepoCertificates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveRepoCertificates'
|
|
type DB_RemoveRepoCertificates_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RemoveRepoCertificates is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - selector *db.CertificateListSelector
|
|
func (_e *DB_Expecter) RemoveRepoCertificates(ctx any, selector any) *DB_RemoveRepoCertificates_Call {
|
|
return &DB_RemoveRepoCertificates_Call{Call: _e.mock.On("RemoveRepoCertificates", ctx, selector)}
|
|
}
|
|
|
|
func (_c *DB_RemoveRepoCertificates_Call) Run(run func(ctx context.Context, selector *db.CertificateListSelector)) *DB_RemoveRepoCertificates_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *db.CertificateListSelector
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*db.CertificateListSelector)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_RemoveRepoCertificates_Call) Return(repositoryCertificateList *v1alpha1.RepositoryCertificateList, err error) *DB_RemoveRepoCertificates_Call {
|
|
_c.Call.Return(repositoryCertificateList, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_RemoveRepoCertificates_Call) RunAndReturn(run func(ctx context.Context, selector *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error)) *DB_RemoveRepoCertificates_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RepositoryExists provides a mock function for the type DB
|
|
func (_mock *DB) RepositoryExists(ctx context.Context, repoURL string, project string) (bool, error) {
|
|
ret := _mock.Called(ctx, repoURL, project)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RepositoryExists")
|
|
}
|
|
|
|
var r0 bool
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (bool, error)); ok {
|
|
return returnFunc(ctx, repoURL, project)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) bool); ok {
|
|
r0 = returnFunc(ctx, repoURL, project)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
|
r1 = returnFunc(ctx, repoURL, project)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_RepositoryExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RepositoryExists'
|
|
type DB_RepositoryExists_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RepositoryExists is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - repoURL string
|
|
// - project string
|
|
func (_e *DB_Expecter) RepositoryExists(ctx any, repoURL any, project any) *DB_RepositoryExists_Call {
|
|
return &DB_RepositoryExists_Call{Call: _e.mock.On("RepositoryExists", ctx, repoURL, project)}
|
|
}
|
|
|
|
func (_c *DB_RepositoryExists_Call) Run(run func(ctx context.Context, repoURL string, project string)) *DB_RepositoryExists_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_RepositoryExists_Call) Return(b bool, err error) *DB_RepositoryExists_Call {
|
|
_c.Call.Return(b, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_RepositoryExists_Call) RunAndReturn(run func(ctx context.Context, repoURL string, project string) (bool, error)) *DB_RepositoryExists_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateCluster provides a mock function for the type DB
|
|
func (_mock *DB) UpdateCluster(ctx context.Context, c *v1alpha1.Cluster) (*v1alpha1.Cluster, error) {
|
|
ret := _mock.Called(ctx, c)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateCluster")
|
|
}
|
|
|
|
var r0 *v1alpha1.Cluster
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Cluster) (*v1alpha1.Cluster, error)); ok {
|
|
return returnFunc(ctx, c)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Cluster) *v1alpha1.Cluster); ok {
|
|
r0 = returnFunc(ctx, c)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.Cluster)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.Cluster) error); ok {
|
|
r1 = returnFunc(ctx, c)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_UpdateCluster_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCluster'
|
|
type DB_UpdateCluster_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateCluster is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - c *v1alpha1.Cluster
|
|
func (_e *DB_Expecter) UpdateCluster(ctx any, c any) *DB_UpdateCluster_Call {
|
|
return &DB_UpdateCluster_Call{Call: _e.mock.On("UpdateCluster", ctx, c)}
|
|
}
|
|
|
|
func (_c *DB_UpdateCluster_Call) Run(run func(ctx context.Context, c *v1alpha1.Cluster)) *DB_UpdateCluster_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *v1alpha1.Cluster
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*v1alpha1.Cluster)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_UpdateCluster_Call) Return(cluster *v1alpha1.Cluster, err error) *DB_UpdateCluster_Call {
|
|
_c.Call.Return(cluster, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_UpdateCluster_Call) RunAndReturn(run func(ctx context.Context, c *v1alpha1.Cluster) (*v1alpha1.Cluster, error)) *DB_UpdateCluster_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateRepository provides a mock function for the type DB
|
|
func (_mock *DB) UpdateRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) {
|
|
ret := _mock.Called(ctx, r)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateRepository")
|
|
}
|
|
|
|
var r0 *v1alpha1.Repository
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)); ok {
|
|
return returnFunc(ctx, r)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) *v1alpha1.Repository); ok {
|
|
r0 = returnFunc(ctx, r)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.Repository)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.Repository) error); ok {
|
|
r1 = returnFunc(ctx, r)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_UpdateRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRepository'
|
|
type DB_UpdateRepository_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateRepository is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - r *v1alpha1.Repository
|
|
func (_e *DB_Expecter) UpdateRepository(ctx any, r any) *DB_UpdateRepository_Call {
|
|
return &DB_UpdateRepository_Call{Call: _e.mock.On("UpdateRepository", ctx, r)}
|
|
}
|
|
|
|
func (_c *DB_UpdateRepository_Call) Run(run func(ctx context.Context, r *v1alpha1.Repository)) *DB_UpdateRepository_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *v1alpha1.Repository
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*v1alpha1.Repository)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_UpdateRepository_Call) Return(repository *v1alpha1.Repository, err error) *DB_UpdateRepository_Call {
|
|
_c.Call.Return(repository, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_UpdateRepository_Call) RunAndReturn(run func(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error)) *DB_UpdateRepository_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateRepositoryCredentials provides a mock function for the type DB
|
|
func (_mock *DB) UpdateRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) {
|
|
ret := _mock.Called(ctx, r)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateRepositoryCredentials")
|
|
}
|
|
|
|
var r0 *v1alpha1.RepoCreds
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)); ok {
|
|
return returnFunc(ctx, r)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) *v1alpha1.RepoCreds); ok {
|
|
r0 = returnFunc(ctx, r)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.RepoCreds)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepoCreds) error); ok {
|
|
r1 = returnFunc(ctx, r)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_UpdateRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRepositoryCredentials'
|
|
type DB_UpdateRepositoryCredentials_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateRepositoryCredentials is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - r *v1alpha1.RepoCreds
|
|
func (_e *DB_Expecter) UpdateRepositoryCredentials(ctx any, r any) *DB_UpdateRepositoryCredentials_Call {
|
|
return &DB_UpdateRepositoryCredentials_Call{Call: _e.mock.On("UpdateRepositoryCredentials", ctx, r)}
|
|
}
|
|
|
|
func (_c *DB_UpdateRepositoryCredentials_Call) Run(run func(ctx context.Context, r *v1alpha1.RepoCreds)) *DB_UpdateRepositoryCredentials_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *v1alpha1.RepoCreds
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*v1alpha1.RepoCreds)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_UpdateRepositoryCredentials_Call) Return(repoCreds *v1alpha1.RepoCreds, err error) *DB_UpdateRepositoryCredentials_Call {
|
|
_c.Call.Return(repoCreds, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_UpdateRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)) *DB_UpdateRepositoryCredentials_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateWriteRepository provides a mock function for the type DB
|
|
func (_mock *DB) UpdateWriteRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) {
|
|
ret := _mock.Called(ctx, r)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateWriteRepository")
|
|
}
|
|
|
|
var r0 *v1alpha1.Repository
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)); ok {
|
|
return returnFunc(ctx, r)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) *v1alpha1.Repository); ok {
|
|
r0 = returnFunc(ctx, r)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.Repository)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.Repository) error); ok {
|
|
r1 = returnFunc(ctx, r)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_UpdateWriteRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateWriteRepository'
|
|
type DB_UpdateWriteRepository_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateWriteRepository is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - r *v1alpha1.Repository
|
|
func (_e *DB_Expecter) UpdateWriteRepository(ctx any, r any) *DB_UpdateWriteRepository_Call {
|
|
return &DB_UpdateWriteRepository_Call{Call: _e.mock.On("UpdateWriteRepository", ctx, r)}
|
|
}
|
|
|
|
func (_c *DB_UpdateWriteRepository_Call) Run(run func(ctx context.Context, r *v1alpha1.Repository)) *DB_UpdateWriteRepository_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *v1alpha1.Repository
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*v1alpha1.Repository)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_UpdateWriteRepository_Call) Return(repository *v1alpha1.Repository, err error) *DB_UpdateWriteRepository_Call {
|
|
_c.Call.Return(repository, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_UpdateWriteRepository_Call) RunAndReturn(run func(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error)) *DB_UpdateWriteRepository_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateWriteRepositoryCredentials provides a mock function for the type DB
|
|
func (_mock *DB) UpdateWriteRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) {
|
|
ret := _mock.Called(ctx, r)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateWriteRepositoryCredentials")
|
|
}
|
|
|
|
var r0 *v1alpha1.RepoCreds
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)); ok {
|
|
return returnFunc(ctx, r)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) *v1alpha1.RepoCreds); ok {
|
|
r0 = returnFunc(ctx, r)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.RepoCreds)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepoCreds) error); ok {
|
|
r1 = returnFunc(ctx, r)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_UpdateWriteRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateWriteRepositoryCredentials'
|
|
type DB_UpdateWriteRepositoryCredentials_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateWriteRepositoryCredentials is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - r *v1alpha1.RepoCreds
|
|
func (_e *DB_Expecter) UpdateWriteRepositoryCredentials(ctx any, r any) *DB_UpdateWriteRepositoryCredentials_Call {
|
|
return &DB_UpdateWriteRepositoryCredentials_Call{Call: _e.mock.On("UpdateWriteRepositoryCredentials", ctx, r)}
|
|
}
|
|
|
|
func (_c *DB_UpdateWriteRepositoryCredentials_Call) Run(run func(ctx context.Context, r *v1alpha1.RepoCreds)) *DB_UpdateWriteRepositoryCredentials_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *v1alpha1.RepoCreds
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*v1alpha1.RepoCreds)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_UpdateWriteRepositoryCredentials_Call) Return(repoCreds *v1alpha1.RepoCreds, err error) *DB_UpdateWriteRepositoryCredentials_Call {
|
|
_c.Call.Return(repoCreds, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_UpdateWriteRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)) *DB_UpdateWriteRepositoryCredentials_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// WatchClusters provides a mock function for the type DB
|
|
func (_mock *DB) WatchClusters(ctx context.Context, handleAddEvent func(cluster *v1alpha1.Cluster), handleModEvent func(oldCluster *v1alpha1.Cluster, newCluster *v1alpha1.Cluster), handleDeleteEvent func(clusterServer string)) error {
|
|
ret := _mock.Called(ctx, handleAddEvent, handleModEvent, handleDeleteEvent)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for WatchClusters")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, func(cluster *v1alpha1.Cluster), func(oldCluster *v1alpha1.Cluster, newCluster *v1alpha1.Cluster), func(clusterServer string)) error); ok {
|
|
r0 = returnFunc(ctx, handleAddEvent, handleModEvent, handleDeleteEvent)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// DB_WatchClusters_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchClusters'
|
|
type DB_WatchClusters_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// WatchClusters is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - handleAddEvent func(cluster *v1alpha1.Cluster)
|
|
// - handleModEvent func(oldCluster *v1alpha1.Cluster, newCluster *v1alpha1.Cluster)
|
|
// - handleDeleteEvent func(clusterServer string)
|
|
func (_e *DB_Expecter) WatchClusters(ctx any, handleAddEvent any, handleModEvent any, handleDeleteEvent any) *DB_WatchClusters_Call {
|
|
return &DB_WatchClusters_Call{Call: _e.mock.On("WatchClusters", ctx, handleAddEvent, handleModEvent, handleDeleteEvent)}
|
|
}
|
|
|
|
func (_c *DB_WatchClusters_Call) Run(run func(ctx context.Context, handleAddEvent func(cluster *v1alpha1.Cluster), handleModEvent func(oldCluster *v1alpha1.Cluster, newCluster *v1alpha1.Cluster), handleDeleteEvent func(clusterServer string))) *DB_WatchClusters_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 func(cluster *v1alpha1.Cluster)
|
|
if args[1] != nil {
|
|
arg1 = args[1].(func(cluster *v1alpha1.Cluster))
|
|
}
|
|
var arg2 func(oldCluster *v1alpha1.Cluster, newCluster *v1alpha1.Cluster)
|
|
if args[2] != nil {
|
|
arg2 = args[2].(func(oldCluster *v1alpha1.Cluster, newCluster *v1alpha1.Cluster))
|
|
}
|
|
var arg3 func(clusterServer string)
|
|
if args[3] != nil {
|
|
arg3 = args[3].(func(clusterServer string))
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
arg3,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_WatchClusters_Call) Return(err error) *DB_WatchClusters_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_WatchClusters_Call) RunAndReturn(run func(ctx context.Context, handleAddEvent func(cluster *v1alpha1.Cluster), handleModEvent func(oldCluster *v1alpha1.Cluster, newCluster *v1alpha1.Cluster), handleDeleteEvent func(clusterServer string)) error) *DB_WatchClusters_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// WriteRepositoryExists provides a mock function for the type DB
|
|
func (_mock *DB) WriteRepositoryExists(ctx context.Context, repoURL string, project string) (bool, error) {
|
|
ret := _mock.Called(ctx, repoURL, project)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for WriteRepositoryExists")
|
|
}
|
|
|
|
var r0 bool
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (bool, error)); ok {
|
|
return returnFunc(ctx, repoURL, project)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) bool); ok {
|
|
r0 = returnFunc(ctx, repoURL, project)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
|
r1 = returnFunc(ctx, repoURL, project)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// DB_WriteRepositoryExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteRepositoryExists'
|
|
type DB_WriteRepositoryExists_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// WriteRepositoryExists is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - repoURL string
|
|
// - project string
|
|
func (_e *DB_Expecter) WriteRepositoryExists(ctx any, repoURL any, project any) *DB_WriteRepositoryExists_Call {
|
|
return &DB_WriteRepositoryExists_Call{Call: _e.mock.On("WriteRepositoryExists", ctx, repoURL, project)}
|
|
}
|
|
|
|
func (_c *DB_WriteRepositoryExists_Call) Run(run func(ctx context.Context, repoURL string, project string)) *DB_WriteRepositoryExists_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_WriteRepositoryExists_Call) Return(b bool, err error) *DB_WriteRepositoryExists_Call {
|
|
_c.Call.Return(b, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *DB_WriteRepositoryExists_Call) RunAndReturn(run func(ctx context.Context, repoURL string, project string) (bool, error)) *DB_WriteRepositoryExists_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|