Get RunnerScaleSet based on both RunnerGroupId and Name. (#2413)

This commit is contained in:
Tingluo Huang
2023-03-15 11:10:09 -04:00
committed by GitHub
parent 40811ebe0e
commit 08acb1b831
6 changed files with 37 additions and 32 deletions
+7 -7
View File
@@ -263,13 +263,13 @@ func (_m *MockActionsService) GetRunnerGroupByName(ctx context.Context, runnerGr
return r0, r1
}
// GetRunnerScaleSet provides a mock function with given fields: ctx, runnerScaleSetName
func (_m *MockActionsService) GetRunnerScaleSet(ctx context.Context, runnerScaleSetName string) (*RunnerScaleSet, error) {
ret := _m.Called(ctx, runnerScaleSetName)
// GetRunnerScaleSet provides a mock function with given fields: ctx, runnerGroupId, runnerScaleSetName
func (_m *MockActionsService) GetRunnerScaleSet(ctx context.Context, runnerGroupId int, runnerScaleSetName string) (*RunnerScaleSet, error) {
ret := _m.Called(ctx, runnerGroupId, runnerScaleSetName)
var r0 *RunnerScaleSet
if rf, ok := ret.Get(0).(func(context.Context, string) *RunnerScaleSet); ok {
r0 = rf(ctx, runnerScaleSetName)
if rf, ok := ret.Get(0).(func(context.Context, int, string) *RunnerScaleSet); ok {
r0 = rf(ctx, runnerGroupId, runnerScaleSetName)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*RunnerScaleSet)
@@ -277,8 +277,8 @@ func (_m *MockActionsService) GetRunnerScaleSet(ctx context.Context, runnerScale
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, runnerScaleSetName)
if rf, ok := ret.Get(1).(func(context.Context, int, string) error); ok {
r1 = rf(ctx, runnerGroupId, runnerScaleSetName)
} else {
r1 = ret.Error(1)
}