blob: 0b93878031fe1d5dbcaa8f40178c8f130bc9d2d4 [file] [log] [blame]
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
package mocks
import (
context "context"
mock "github.com/stretchr/testify/mock"
machine "go.skia.org/infra/machine/go/machine"
store "go.skia.org/infra/machine/go/machine/store"
)
// Store is an autogenerated mock type for the Store type
type Store struct {
mock.Mock
}
// Delete provides a mock function with given fields: ctx, machineID
func (_m *Store) Delete(ctx context.Context, machineID string) error {
ret := _m.Called(ctx, machineID)
if len(ret) == 0 {
panic("no return value specified for Delete")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, machineID)
} else {
r0 = ret.Error(0)
}
return r0
}
// Get provides a mock function with given fields: ctx, machineID
func (_m *Store) Get(ctx context.Context, machineID string) (machine.Description, error) {
ret := _m.Called(ctx, machineID)
if len(ret) == 0 {
panic("no return value specified for Get")
}
var r0 machine.Description
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (machine.Description, error)); ok {
return rf(ctx, machineID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) machine.Description); ok {
r0 = rf(ctx, machineID)
} else {
r0 = ret.Get(0).(machine.Description)
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, machineID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetFreeMachines provides a mock function with given fields: ctx, pool
func (_m *Store) GetFreeMachines(ctx context.Context, pool string) ([]machine.Description, error) {
ret := _m.Called(ctx, pool)
if len(ret) == 0 {
panic("no return value specified for GetFreeMachines")
}
var r0 []machine.Description
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]machine.Description, error)); ok {
return rf(ctx, pool)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []machine.Description); ok {
r0 = rf(ctx, pool)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]machine.Description)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, pool)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// List provides a mock function with given fields: ctx
func (_m *Store) List(ctx context.Context) ([]machine.Description, error) {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for List")
}
var r0 []machine.Description
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]machine.Description, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []machine.Description); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]machine.Description)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListPowerCycle provides a mock function with given fields: ctx
func (_m *Store) ListPowerCycle(ctx context.Context) ([]string, error) {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for ListPowerCycle")
}
var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []string); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Update provides a mock function with given fields: ctx, machineID, updateCallback
func (_m *Store) Update(ctx context.Context, machineID string, updateCallback store.UpdateCallback) error {
ret := _m.Called(ctx, machineID, updateCallback)
if len(ret) == 0 {
panic("no return value specified for Update")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, store.UpdateCallback) error); ok {
r0 = rf(ctx, machineID, updateCallback)
} else {
r0 = ret.Error(0)
}
return r0
}
// NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewStore(t interface {
mock.TestingT
Cleanup(func())
}) *Store {
mock := &Store{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}