2023-07-04 22:11:45 +00:00
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
2022-07-10 14:52:15 +00:00
package mocks
import (
context "context"
2023-03-12 16:01:49 +02:00
params "github.com/cloudbase/garm/params"
2022-07-10 14:52:15 +00:00
mock "github.com/stretchr/testify/mock"
)
// Provider is an autogenerated mock type for the Provider type
type Provider struct {
mock . Mock
}
// AsParams provides a mock function with given fields:
func ( _m * Provider ) AsParams ( ) params . Provider {
ret := _m . Called ( )
var r0 params . Provider
if rf , ok := ret . Get ( 0 ) . ( func ( ) params . Provider ) ; ok {
r0 = rf ( )
} else {
r0 = ret . Get ( 0 ) . ( params . Provider )
}
return r0
}
// CreateInstance provides a mock function with given fields: ctx, bootstrapParams
func ( _m * Provider ) CreateInstance ( ctx context . Context , bootstrapParams params . BootstrapInstance ) ( params . Instance , error ) {
ret := _m . Called ( ctx , bootstrapParams )
var r0 params . Instance
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . BootstrapInstance ) ( params . Instance , error ) ) ; ok {
return rf ( ctx , bootstrapParams )
}
2022-07-10 14:52:15 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . BootstrapInstance ) params . Instance ) ; ok {
r0 = rf ( ctx , bootstrapParams )
} else {
r0 = ret . Get ( 0 ) . ( params . Instance )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , params . BootstrapInstance ) error ) ; ok {
r1 = rf ( ctx , bootstrapParams )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// DeleteInstance provides a mock function with given fields: ctx, instance
func ( _m * Provider ) DeleteInstance ( ctx context . Context , instance string ) error {
ret := _m . Called ( ctx , instance )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) error ) ; ok {
r0 = rf ( ctx , instance )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// GetInstance provides a mock function with given fields: ctx, instance
func ( _m * Provider ) GetInstance ( ctx context . Context , instance string ) ( params . Instance , error ) {
ret := _m . Called ( ctx , instance )
var r0 params . Instance
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( params . Instance , error ) ) ; ok {
return rf ( ctx , instance )
}
2022-07-10 14:52:15 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) params . Instance ) ; ok {
r0 = rf ( ctx , instance )
} else {
r0 = ret . Get ( 0 ) . ( params . Instance )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , instance )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// ListInstances provides a mock function with given fields: ctx, poolID
func ( _m * Provider ) ListInstances ( ctx context . Context , poolID string ) ( [ ] params . Instance , error ) {
ret := _m . Called ( ctx , poolID )
var r0 [ ] params . Instance
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( [ ] params . Instance , error ) ) ; ok {
return rf ( ctx , poolID )
}
2022-07-10 14:52:15 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) [ ] params . Instance ) ; ok {
r0 = rf ( ctx , poolID )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] params . Instance )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , poolID )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// RemoveAllInstances provides a mock function with given fields: ctx
func ( _m * Provider ) RemoveAllInstances ( ctx context . Context ) error {
ret := _m . Called ( ctx )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) error ) ; ok {
r0 = rf ( ctx )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// Start provides a mock function with given fields: ctx, instance
func ( _m * Provider ) Start ( ctx context . Context , instance string ) error {
ret := _m . Called ( ctx , instance )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) error ) ; ok {
r0 = rf ( ctx , instance )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// Stop provides a mock function with given fields: ctx, instance, force
func ( _m * Provider ) Stop ( ctx context . Context , instance string , force bool ) error {
ret := _m . Called ( ctx , instance , force )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , bool ) error ) ; ok {
r0 = rf ( ctx , instance , force )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2023-07-04 22:11:45 +00:00
// NewProvider creates a new instance of Provider. 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 NewProvider ( t interface {
2022-07-10 14:52:15 +00:00
mock . TestingT
Cleanup ( func ( ) )
2023-07-04 22:11:45 +00:00
} ) * Provider {
2022-07-10 14:52:15 +00:00
mock := & Provider { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}