Make Execution Environment interface Nomad independent
This commit is contained in:
@ -5,8 +5,6 @@ package runner
|
||||
import (
|
||||
dto "github.com/openHPI/poseidon/pkg/dto"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
nomad "github.com/openHPI/poseidon/internal/nomad"
|
||||
)
|
||||
|
||||
// ExecutionEnvironmentMock is an autogenerated mock type for the ExecutionEnvironment type
|
||||
@ -19,13 +17,13 @@ func (_m *ExecutionEnvironmentMock) AddRunner(r Runner) {
|
||||
_m.Called(r)
|
||||
}
|
||||
|
||||
// ApplyPrewarmingPoolSize provides a mock function with given fields: apiClient
|
||||
func (_m *ExecutionEnvironmentMock) ApplyPrewarmingPoolSize(apiClient nomad.ExecutorAPI) error {
|
||||
ret := _m.Called(apiClient)
|
||||
// ApplyPrewarmingPoolSize provides a mock function with given fields:
|
||||
func (_m *ExecutionEnvironmentMock) ApplyPrewarmingPoolSize() error {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(nomad.ExecutorAPI) error); ok {
|
||||
r0 = rf(apiClient)
|
||||
if rf, ok := ret.Get(0).(func() error); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@ -47,13 +45,13 @@ func (_m *ExecutionEnvironmentMock) CPULimit() uint {
|
||||
return r0
|
||||
}
|
||||
|
||||
// Delete provides a mock function with given fields: apiClient
|
||||
func (_m *ExecutionEnvironmentMock) Delete(apiClient nomad.ExecutorAPI) error {
|
||||
ret := _m.Called(apiClient)
|
||||
// Delete provides a mock function with given fields:
|
||||
func (_m *ExecutionEnvironmentMock) Delete() error {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(nomad.ExecutorAPI) error); ok {
|
||||
r0 = rf(apiClient)
|
||||
if rf, ok := ret.Get(0).(func() error); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@ -182,13 +180,13 @@ func (_m *ExecutionEnvironmentMock) PrewarmingPoolSize() uint {
|
||||
return r0
|
||||
}
|
||||
|
||||
// Register provides a mock function with given fields: apiClient
|
||||
func (_m *ExecutionEnvironmentMock) Register(apiClient nomad.ExecutorAPI) error {
|
||||
ret := _m.Called(apiClient)
|
||||
// Register provides a mock function with given fields:
|
||||
func (_m *ExecutionEnvironmentMock) Register() error {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(nomad.ExecutorAPI) error); ok {
|
||||
r0 = rf(apiClient)
|
||||
if rf, ok := ret.Get(0).(func() error); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@ -196,13 +194,13 @@ func (_m *ExecutionEnvironmentMock) Register(apiClient nomad.ExecutorAPI) error
|
||||
return r0
|
||||
}
|
||||
|
||||
// Sample provides a mock function with given fields: apiClient
|
||||
func (_m *ExecutionEnvironmentMock) Sample(apiClient nomad.ExecutorAPI) (Runner, bool) {
|
||||
ret := _m.Called(apiClient)
|
||||
// Sample provides a mock function with given fields:
|
||||
func (_m *ExecutionEnvironmentMock) Sample() (Runner, bool) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 Runner
|
||||
if rf, ok := ret.Get(0).(func(nomad.ExecutorAPI) Runner); ok {
|
||||
r0 = rf(apiClient)
|
||||
if rf, ok := ret.Get(0).(func() Runner); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(Runner)
|
||||
@ -210,8 +208,8 @@ func (_m *ExecutionEnvironmentMock) Sample(apiClient nomad.ExecutorAPI) (Runner,
|
||||
}
|
||||
|
||||
var r1 bool
|
||||
if rf, ok := ret.Get(1).(func(nomad.ExecutorAPI) bool); ok {
|
||||
r1 = rf(apiClient)
|
||||
if rf, ok := ret.Get(1).(func() bool); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
r1 = ret.Get(1).(bool)
|
||||
}
|
||||
|
Reference in New Issue
Block a user