148 lines
3.0 KiB
Go
148 lines
3.0 KiB
Go
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
|
|
|
|
package nomad
|
|
|
|
import (
|
|
api "github.com/hashicorp/nomad/api"
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
url "net/url"
|
|
)
|
|
|
|
// ExecutorApiMock is an autogenerated mock type for the ExecutorApi type
|
|
type ExecutorApiMock struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// DeleteRunner provides a mock function with given fields: runnerId
|
|
func (_m *ExecutorApiMock) DeleteRunner(runnerId string) error {
|
|
ret := _m.Called(runnerId)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(runnerId)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetJobScale provides a mock function with given fields: jobId
|
|
func (_m *ExecutorApiMock) GetJobScale(jobId string) (int, error) {
|
|
ret := _m.Called(jobId)
|
|
|
|
var r0 int
|
|
if rf, ok := ret.Get(0).(func(string) int); ok {
|
|
r0 = rf(jobId)
|
|
} else {
|
|
r0 = ret.Get(0).(int)
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(jobId)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
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()
|
|
|
|
var r0 []*api.JobListStub
|
|
if rf, ok := ret.Get(0).(func() []*api.JobListStub); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*api.JobListStub)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func() error); ok {
|
|
r1 = rf()
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
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 {
|
|
ret := _m.Called(jobId, count, reason)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, int, string) error); ok {
|
|
r0 = rf(jobId, count, reason)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// init provides a mock function with given fields: nomadURL
|
|
func (_m *ExecutorApiMock) init(nomadURL *url.URL) error {
|
|
ret := _m.Called(nomadURL)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(*url.URL) error); ok {
|
|
r0 = rf(nomadURL)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// loadRunners provides a mock function with given fields: jobId
|
|
func (_m *ExecutorApiMock) loadRunners(jobId string) ([]*api.AllocationListStub, error) {
|
|
ret := _m.Called(jobId)
|
|
|
|
var r0 []*api.AllocationListStub
|
|
if rf, ok := ret.Get(0).(func(string) []*api.AllocationListStub); ok {
|
|
r0 = rf(jobId)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*api.AllocationListStub)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(jobId)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|