Rename job scale functions to be consistent in naming

This commit is contained in:
sirkrypt0
2021-05-11 08:45:59 +02:00
committed by Konrad Hanff
parent a2a9ed367a
commit cee5eee622
9 changed files with 84 additions and 68 deletions

View File

@@ -1,4 +1,4 @@
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
// Code generated by mockery v2.7.5. DO NOT EDIT.
package nomad
@@ -28,8 +28,8 @@ func (_m *ExecutorApiMock) DeleteRunner(runnerId string) error {
return r0
}
// GetJobScale provides a mock function with given fields: jobId
func (_m *ExecutorApiMock) GetJobScale(jobId string) (int, error) {
// JobScale provides a mock function with given fields: jobId
func (_m *ExecutorApiMock) JobScale(jobId string) (int, error) {
ret := _m.Called(jobId)
var r0 int
@@ -49,29 +49,6 @@ func (_m *ExecutorApiMock) GetJobScale(jobId string) (int, error) {
return r0, r1
}
// LoadAvailableRunners provides a mock function with given fields: jobId
func (_m *ExecutorApiMock) LoadAvailableRunners(jobId string) ([]string, error) {
ret := _m.Called(jobId)
var r0 []string
if rf, ok := ret.Get(0).(func(string) []string); ok {
r0 = rf(jobId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(jobId)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// LoadJobList provides a mock function with given fields:
func (_m *ExecutorApiMock) LoadJobList() ([]*api.JobListStub, error) {
ret := _m.Called()
@@ -95,8 +72,31 @@ func (_m *ExecutorApiMock) LoadJobList() ([]*api.JobListStub, error) {
return r0, r1
}
// SetJobScaling provides a mock function with given fields: jobId, count, reason
func (_m *ExecutorApiMock) SetJobScaling(jobId string, count int, reason string) error {
// LoadRunners provides a mock function with given fields: jobId
func (_m *ExecutorApiMock) LoadRunners(jobId string) ([]string, error) {
ret := _m.Called(jobId)
var r0 []string
if rf, ok := ret.Get(0).(func(string) []string); ok {
r0 = rf(jobId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(jobId)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SetJobScale provides a mock function with given fields: jobId, count, reason
func (_m *ExecutorApiMock) SetJobScale(jobId string, count int, reason string) error {
ret := _m.Called(jobId, count, reason)
var r0 error