2024-04-11 05:37:59 +02:00
// Code generated by mockery v2.42.2. DO NOT EDIT.
2022-11-17 13:12:07 +01:00
package jobmonitor
import (
context "context"
mock "github.com/stretchr/testify/mock"
)
// RedisClient is an autogenerated mock type for the RedisClient type
type RedisClient struct {
mock . Mock
}
// AllJobTypes provides a mock function with given fields: ctx
func ( _m * RedisClient ) AllJobTypes ( ctx context . Context ) ( [ ] string , error ) {
ret := _m . Called ( ctx )
2024-04-11 05:37:59 +02:00
if len ( ret ) == 0 {
panic ( "no return value specified for AllJobTypes" )
}
2022-11-17 13:12:07 +01:00
var r0 [ ] string
2023-03-11 01:16:11 +01:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( [ ] string , error ) ) ; ok {
return rf ( ctx )
}
2022-11-17 13:12:07 +01:00
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
}
// PauseJob provides a mock function with given fields: ctx, jobName
func ( _m * RedisClient ) PauseJob ( ctx context . Context , jobName string ) error {
ret := _m . Called ( ctx , jobName )
2024-04-11 05:37:59 +02:00
if len ( ret ) == 0 {
panic ( "no return value specified for PauseJob" )
}
2022-11-17 13:12:07 +01:00
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) error ) ; ok {
r0 = rf ( ctx , jobName )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// StopPendingJobs provides a mock function with given fields: ctx, jobType
func ( _m * RedisClient ) StopPendingJobs ( ctx context . Context , jobType string ) ( [ ] string , error ) {
ret := _m . Called ( ctx , jobType )
2024-04-11 05:37:59 +02:00
if len ( ret ) == 0 {
panic ( "no return value specified for StopPendingJobs" )
}
2022-11-17 13:12:07 +01:00
var r0 [ ] string
2023-03-11 01:16:11 +01:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( [ ] string , error ) ) ; ok {
return rf ( ctx , jobType )
}
2022-11-17 13:12:07 +01:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) [ ] string ) ; ok {
r0 = rf ( ctx , jobType )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] string )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , jobType )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// UnpauseJob provides a mock function with given fields: ctx, jobName
func ( _m * RedisClient ) UnpauseJob ( ctx context . Context , jobName string ) error {
ret := _m . Called ( ctx , jobName )
2024-04-11 05:37:59 +02:00
if len ( ret ) == 0 {
panic ( "no return value specified for UnpauseJob" )
}
2022-11-17 13:12:07 +01:00
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) error ) ; ok {
r0 = rf ( ctx , jobName )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2023-11-05 07:37:25 +01:00
// NewRedisClient creates a new instance of RedisClient. 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 NewRedisClient ( t interface {
2022-11-17 13:12:07 +01:00
mock . TestingT
Cleanup ( func ( ) )
2023-11-05 07:37:25 +01:00
} ) * RedisClient {
2022-11-17 13:12:07 +01:00
mock := & RedisClient { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}