Update mocks
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
884be62a4d
commit
55b4e74066
6 changed files with 404 additions and 119 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by mockery v2.42.0. DO NOT EDIT.
|
||||
// Code generated by mockery v2.53.3. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
|
||||
|
|
@ -14,6 +14,24 @@ type Store struct {
|
|||
mock.Mock
|
||||
}
|
||||
|
||||
// AddEntityEvent provides a mock function with given fields: ctx, entity, event, eventLevel, statusMessage, maxEvents
|
||||
func (_m *Store) AddEntityEvent(ctx context.Context, entity params.GithubEntity, event params.EventType, eventLevel params.EventLevel, statusMessage string, maxEvents int) error {
|
||||
ret := _m.Called(ctx, entity, event, eventLevel, statusMessage, maxEvents)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AddEntityEvent")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, params.GithubEntity, params.EventType, params.EventLevel, string, int) error); ok {
|
||||
r0 = rf(ctx, entity, event, eventLevel, statusMessage, maxEvents)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// AddInstanceEvent provides a mock function with given fields: ctx, instanceName, event, eventLevel, eventMessage
|
||||
func (_m *Store) AddInstanceEvent(ctx context.Context, instanceName string, event params.EventType, eventLevel params.EventLevel, eventMessage string) error {
|
||||
ret := _m.Called(ctx, instanceName, event, eventLevel, eventMessage)
|
||||
|
|
@ -50,7 +68,7 @@ func (_m *Store) BreakLockJobIsQueued(ctx context.Context, jobID int64) error {
|
|||
return r0
|
||||
}
|
||||
|
||||
// ControllerInfo provides a mock function with given fields:
|
||||
// ControllerInfo provides a mock function with no fields
|
||||
func (_m *Store) ControllerInfo() (params.ControllerInfo, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
|
|
@ -134,6 +152,34 @@ func (_m *Store) CreateEntityPool(ctx context.Context, entity params.GithubEntit
|
|||
return r0, r1
|
||||
}
|
||||
|
||||
// CreateEntityScaleSet provides a mock function with given fields: _a0, entity, param
|
||||
func (_m *Store) CreateEntityScaleSet(_a0 context.Context, entity params.GithubEntity, param params.CreateScaleSetParams) (params.ScaleSet, error) {
|
||||
ret := _m.Called(_a0, entity, param)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreateEntityScaleSet")
|
||||
}
|
||||
|
||||
var r0 params.ScaleSet
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, params.GithubEntity, params.CreateScaleSetParams) (params.ScaleSet, error)); ok {
|
||||
return rf(_a0, entity, param)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, params.GithubEntity, params.CreateScaleSetParams) params.ScaleSet); ok {
|
||||
r0 = rf(_a0, entity, param)
|
||||
} else {
|
||||
r0 = ret.Get(0).(params.ScaleSet)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, params.GithubEntity, params.CreateScaleSetParams) error); ok {
|
||||
r1 = rf(_a0, entity, param)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// CreateGithubCredentials provides a mock function with given fields: ctx, param
|
||||
func (_m *Store) CreateGithubCredentials(ctx context.Context, param params.CreateGithubCredentialsParams) (params.GithubCredentials, error) {
|
||||
ret := _m.Called(ctx, param)
|
||||
|
|
@ -302,6 +348,34 @@ func (_m *Store) CreateRepository(ctx context.Context, owner string, name string
|
|||
return r0, r1
|
||||
}
|
||||
|
||||
// CreateScaleSetInstance provides a mock function with given fields: _a0, scaleSetID, param
|
||||
func (_m *Store) CreateScaleSetInstance(_a0 context.Context, scaleSetID uint, param params.CreateInstanceParams) (params.Instance, error) {
|
||||
ret := _m.Called(_a0, scaleSetID, param)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreateScaleSetInstance")
|
||||
}
|
||||
|
||||
var r0 params.Instance
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, uint, params.CreateInstanceParams) (params.Instance, error)); ok {
|
||||
return rf(_a0, scaleSetID, param)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, uint, params.CreateInstanceParams) params.Instance); ok {
|
||||
r0 = rf(_a0, scaleSetID, param)
|
||||
} else {
|
||||
r0 = ret.Get(0).(params.Instance)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, uint, params.CreateInstanceParams) error); ok {
|
||||
r1 = rf(_a0, scaleSetID, param)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// CreateUser provides a mock function with given fields: ctx, user
|
||||
func (_m *Store) CreateUser(ctx context.Context, user params.NewUserParams) (params.User, error) {
|
||||
ret := _m.Called(ctx, user)
|
||||
|
|
@ -438,6 +512,24 @@ func (_m *Store) DeleteInstance(ctx context.Context, poolID string, instanceName
|
|||
return r0
|
||||
}
|
||||
|
||||
// DeleteInstanceByName provides a mock function with given fields: ctx, instanceName
|
||||
func (_m *Store) DeleteInstanceByName(ctx context.Context, instanceName string) error {
|
||||
ret := _m.Called(ctx, instanceName)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteInstanceByName")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, instanceName)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DeleteJob provides a mock function with given fields: ctx, jobID
|
||||
func (_m *Store) DeleteJob(ctx context.Context, jobID int64) error {
|
||||
ret := _m.Called(ctx, jobID)
|
||||
|
|
@ -510,6 +602,24 @@ func (_m *Store) DeleteRepository(ctx context.Context, repoID string) error {
|
|||
return r0
|
||||
}
|
||||
|
||||
// DeleteScaleSetByID provides a mock function with given fields: ctx, scaleSetID
|
||||
func (_m *Store) DeleteScaleSetByID(ctx context.Context, scaleSetID uint) error {
|
||||
ret := _m.Called(ctx, scaleSetID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteScaleSetByID")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, uint) error); ok {
|
||||
r0 = rf(ctx, scaleSetID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// FindPoolsMatchingAllTags provides a mock function with given fields: ctx, entityType, entityID, tags
|
||||
func (_m *Store) FindPoolsMatchingAllTags(ctx context.Context, entityType params.GithubEntityType, entityID string, tags []string) ([]params.Pool, error) {
|
||||
ret := _m.Called(ctx, entityType, entityID, tags)
|
||||
|
|
@ -736,6 +846,34 @@ func (_m *Store) GetGithubEndpoint(ctx context.Context, name string) (params.Git
|
|||
return r0, r1
|
||||
}
|
||||
|
||||
// GetGithubEntity provides a mock function with given fields: _a0, entityType, entityID
|
||||
func (_m *Store) GetGithubEntity(_a0 context.Context, entityType params.GithubEntityType, entityID string) (params.GithubEntity, error) {
|
||||
ret := _m.Called(_a0, entityType, entityID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetGithubEntity")
|
||||
}
|
||||
|
||||
var r0 params.GithubEntity
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, params.GithubEntityType, string) (params.GithubEntity, error)); ok {
|
||||
return rf(_a0, entityType, entityID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, params.GithubEntityType, string) params.GithubEntity); ok {
|
||||
r0 = rf(_a0, entityType, entityID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(params.GithubEntity)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, params.GithubEntityType, string) error); ok {
|
||||
r1 = rf(_a0, entityType, entityID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetInstanceByName provides a mock function with given fields: ctx, instanceName
|
||||
func (_m *Store) GetInstanceByName(ctx context.Context, instanceName string) (params.Instance, error) {
|
||||
ret := _m.Called(ctx, instanceName)
|
||||
|
|
@ -960,6 +1098,34 @@ func (_m *Store) GetRepositoryByID(ctx context.Context, repoID string) (params.R
|
|||
return r0, r1
|
||||
}
|
||||
|
||||
// GetScaleSetByID provides a mock function with given fields: ctx, scaleSet
|
||||
func (_m *Store) GetScaleSetByID(ctx context.Context, scaleSet uint) (params.ScaleSet, error) {
|
||||
ret := _m.Called(ctx, scaleSet)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetScaleSetByID")
|
||||
}
|
||||
|
||||
var r0 params.ScaleSet
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, uint) (params.ScaleSet, error)); ok {
|
||||
return rf(ctx, scaleSet)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, uint) params.ScaleSet); ok {
|
||||
r0 = rf(ctx, scaleSet)
|
||||
} else {
|
||||
r0 = ret.Get(0).(params.ScaleSet)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, uint) error); ok {
|
||||
r1 = rf(ctx, scaleSet)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetUser provides a mock function with given fields: ctx, user
|
||||
func (_m *Store) GetUser(ctx context.Context, user string) (params.User, error) {
|
||||
ret := _m.Called(ctx, user)
|
||||
|
|
@ -1034,7 +1200,7 @@ func (_m *Store) HasAdminUser(ctx context.Context) bool {
|
|||
return r0
|
||||
}
|
||||
|
||||
// InitController provides a mock function with given fields:
|
||||
// InitController provides a mock function with no fields
|
||||
func (_m *Store) InitController() (params.ControllerInfo, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
|
|
@ -1152,6 +1318,36 @@ func (_m *Store) ListAllPools(ctx context.Context) ([]params.Pool, error) {
|
|||
return r0, r1
|
||||
}
|
||||
|
||||
// ListAllScaleSets provides a mock function with given fields: ctx
|
||||
func (_m *Store) ListAllScaleSets(ctx context.Context) ([]params.ScaleSet, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListAllScaleSets")
|
||||
}
|
||||
|
||||
var r0 []params.ScaleSet
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) ([]params.ScaleSet, error)); ok {
|
||||
return rf(ctx)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context) []params.ScaleSet); ok {
|
||||
r0 = rf(ctx)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]params.ScaleSet)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
||||
r1 = rf(ctx)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// ListEnterprises provides a mock function with given fields: ctx
|
||||
func (_m *Store) ListEnterprises(ctx context.Context) ([]params.Enterprise, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
|
@ -1272,6 +1468,36 @@ func (_m *Store) ListEntityPools(ctx context.Context, entity params.GithubEntity
|
|||
return r0, r1
|
||||
}
|
||||
|
||||
// ListEntityScaleSets provides a mock function with given fields: _a0, entity
|
||||
func (_m *Store) ListEntityScaleSets(_a0 context.Context, entity params.GithubEntity) ([]params.ScaleSet, error) {
|
||||
ret := _m.Called(_a0, entity)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListEntityScaleSets")
|
||||
}
|
||||
|
||||
var r0 []params.ScaleSet
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, params.GithubEntity) ([]params.ScaleSet, error)); ok {
|
||||
return rf(_a0, entity)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, params.GithubEntity) []params.ScaleSet); ok {
|
||||
r0 = rf(_a0, entity)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]params.ScaleSet)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, params.GithubEntity) error); ok {
|
||||
r1 = rf(_a0, entity)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// ListGithubCredentials provides a mock function with given fields: ctx
|
||||
func (_m *Store) ListGithubCredentials(ctx context.Context) ([]params.GithubCredentials, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
|
@ -1452,6 +1678,36 @@ func (_m *Store) ListRepositories(ctx context.Context) ([]params.Repository, err
|
|||
return r0, r1
|
||||
}
|
||||
|
||||
// ListScaleSetInstances provides a mock function with given fields: _a0, scalesetID
|
||||
func (_m *Store) ListScaleSetInstances(_a0 context.Context, scalesetID uint) ([]params.Instance, error) {
|
||||
ret := _m.Called(_a0, scalesetID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListScaleSetInstances")
|
||||
}
|
||||
|
||||
var r0 []params.Instance
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, uint) ([]params.Instance, error)); ok {
|
||||
return rf(_a0, scalesetID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, uint) []params.Instance); ok {
|
||||
r0 = rf(_a0, scalesetID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]params.Instance)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, uint) error); ok {
|
||||
r1 = rf(_a0, scalesetID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// LockJob provides a mock function with given fields: ctx, jobID, entityID
|
||||
func (_m *Store) LockJob(ctx context.Context, jobID int64, entityID string) error {
|
||||
ret := _m.Called(ctx, jobID, entityID)
|
||||
|
|
@ -1498,6 +1754,42 @@ func (_m *Store) PoolInstanceCount(ctx context.Context, poolID string) (int64, e
|
|||
return r0, r1
|
||||
}
|
||||
|
||||
// SetScaleSetDesiredRunnerCount provides a mock function with given fields: ctx, scaleSetID, desiredRunnerCount
|
||||
func (_m *Store) SetScaleSetDesiredRunnerCount(ctx context.Context, scaleSetID uint, desiredRunnerCount int) error {
|
||||
ret := _m.Called(ctx, scaleSetID, desiredRunnerCount)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SetScaleSetDesiredRunnerCount")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, uint, int) error); ok {
|
||||
r0 = rf(ctx, scaleSetID, desiredRunnerCount)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// SetScaleSetLastMessageID provides a mock function with given fields: ctx, scaleSetID, lastMessageID
|
||||
func (_m *Store) SetScaleSetLastMessageID(ctx context.Context, scaleSetID uint, lastMessageID int64) error {
|
||||
ret := _m.Called(ctx, scaleSetID, lastMessageID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SetScaleSetLastMessageID")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, uint, int64) error); ok {
|
||||
r0 = rf(ctx, scaleSetID, lastMessageID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// UnlockJob provides a mock function with given fields: ctx, jobID, entityID
|
||||
func (_m *Store) UnlockJob(ctx context.Context, jobID int64, entityID string) error {
|
||||
ret := _m.Called(ctx, jobID, entityID)
|
||||
|
|
@ -1600,6 +1892,34 @@ func (_m *Store) UpdateEntityPool(ctx context.Context, entity params.GithubEntit
|
|||
return r0, r1
|
||||
}
|
||||
|
||||
// UpdateEntityScaleSet provides a mock function with given fields: _a0, entity, scaleSetID, param, callback
|
||||
func (_m *Store) UpdateEntityScaleSet(_a0 context.Context, entity params.GithubEntity, scaleSetID uint, param params.UpdateScaleSetParams, callback func(params.ScaleSet, params.ScaleSet) error) (params.ScaleSet, error) {
|
||||
ret := _m.Called(_a0, entity, scaleSetID, param, callback)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateEntityScaleSet")
|
||||
}
|
||||
|
||||
var r0 params.ScaleSet
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, params.GithubEntity, uint, params.UpdateScaleSetParams, func(params.ScaleSet, params.ScaleSet) error) (params.ScaleSet, error)); ok {
|
||||
return rf(_a0, entity, scaleSetID, param, callback)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, params.GithubEntity, uint, params.UpdateScaleSetParams, func(params.ScaleSet, params.ScaleSet) error) params.ScaleSet); ok {
|
||||
r0 = rf(_a0, entity, scaleSetID, param, callback)
|
||||
} else {
|
||||
r0 = ret.Get(0).(params.ScaleSet)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, params.GithubEntity, uint, params.UpdateScaleSetParams, func(params.ScaleSet, params.ScaleSet) error) error); ok {
|
||||
r1 = rf(_a0, entity, scaleSetID, param, callback)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// UpdateGithubCredentials provides a mock function with given fields: ctx, id, param
|
||||
func (_m *Store) UpdateGithubCredentials(ctx context.Context, id uint, param params.UpdateGithubCredentialsParams) (params.GithubCredentials, error) {
|
||||
ret := _m.Called(ctx, id, param)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue