github.com/spotahome/redis-operator@v1.2.4/mocks/operator/redisfailover/RedisFailover.go (about)

     1  // Code generated by mockery v2.9.6. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	mock "github.com/stretchr/testify/mock"
     9  
    10  	redisfailoverv1 "github.com/spotahome/redis-operator/api/redisfailover/v1"
    11  
    12  	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    13  
    14  	watch "k8s.io/apimachinery/pkg/watch"
    15  )
    16  
    17  // RedisFailover is an autogenerated mock type for the RedisFailover type
    18  type RedisFailover struct {
    19  	mock.Mock
    20  }
    21  
    22  // ListRedisFailovers provides a mock function with given fields: ctx, namespace, opts
    23  func (_m *RedisFailover) ListRedisFailovers(ctx context.Context, namespace string, opts v1.ListOptions) (*redisfailoverv1.RedisFailoverList, error) {
    24  	ret := _m.Called(ctx, namespace, opts)
    25  
    26  	var r0 *redisfailoverv1.RedisFailoverList
    27  	if rf, ok := ret.Get(0).(func(context.Context, string, v1.ListOptions) *redisfailoverv1.RedisFailoverList); ok {
    28  		r0 = rf(ctx, namespace, opts)
    29  	} else {
    30  		if ret.Get(0) != nil {
    31  			r0 = ret.Get(0).(*redisfailoverv1.RedisFailoverList)
    32  		}
    33  	}
    34  
    35  	var r1 error
    36  	if rf, ok := ret.Get(1).(func(context.Context, string, v1.ListOptions) error); ok {
    37  		r1 = rf(ctx, namespace, opts)
    38  	} else {
    39  		r1 = ret.Error(1)
    40  	}
    41  
    42  	return r0, r1
    43  }
    44  
    45  // WatchRedisFailovers provides a mock function with given fields: ctx, namespace, opts
    46  func (_m *RedisFailover) WatchRedisFailovers(ctx context.Context, namespace string, opts v1.ListOptions) (watch.Interface, error) {
    47  	ret := _m.Called(ctx, namespace, opts)
    48  
    49  	var r0 watch.Interface
    50  	if rf, ok := ret.Get(0).(func(context.Context, string, v1.ListOptions) watch.Interface); ok {
    51  		r0 = rf(ctx, namespace, opts)
    52  	} else {
    53  		if ret.Get(0) != nil {
    54  			r0 = ret.Get(0).(watch.Interface)
    55  		}
    56  	}
    57  
    58  	var r1 error
    59  	if rf, ok := ret.Get(1).(func(context.Context, string, v1.ListOptions) error); ok {
    60  		r1 = rf(ctx, namespace, opts)
    61  	} else {
    62  		r1 = ret.Error(1)
    63  	}
    64  
    65  	return r0, r1
    66  }
    67  
    68  type mockConstructorTestingTNewRedisFailover interface {
    69  	mock.TestingT
    70  	Cleanup(func())
    71  }
    72  
    73  // NewRedisFailover creates a new instance of RedisFailover. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    74  func NewRedisFailover(t mockConstructorTestingTNewRedisFailover) *RedisFailover {
    75  	mock := &RedisFailover{}
    76  	mock.Mock.Test(t)
    77  
    78  	t.Cleanup(func() { mock.AssertExpectations(t) })
    79  
    80  	return mock
    81  }