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

     1  // Code generated by mockery v2.9.6. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import mock "github.com/stretchr/testify/mock"
     6  
     7  // Client is an autogenerated mock type for the Client type
     8  type Client struct {
     9  	mock.Mock
    10  }
    11  
    12  // GetNumberSentinelSlavesInMemory provides a mock function with given fields: ip
    13  func (_m *Client) GetNumberSentinelSlavesInMemory(ip string) (int32, error) {
    14  	ret := _m.Called(ip)
    15  
    16  	var r0 int32
    17  	if rf, ok := ret.Get(0).(func(string) int32); ok {
    18  		r0 = rf(ip)
    19  	} else {
    20  		r0 = ret.Get(0).(int32)
    21  	}
    22  
    23  	var r1 error
    24  	if rf, ok := ret.Get(1).(func(string) error); ok {
    25  		r1 = rf(ip)
    26  	} else {
    27  		r1 = ret.Error(1)
    28  	}
    29  
    30  	return r0, r1
    31  }
    32  
    33  // GetNumberSentinelsInMemory provides a mock function with given fields: ip
    34  func (_m *Client) GetNumberSentinelsInMemory(ip string) (int32, error) {
    35  	ret := _m.Called(ip)
    36  
    37  	var r0 int32
    38  	if rf, ok := ret.Get(0).(func(string) int32); ok {
    39  		r0 = rf(ip)
    40  	} else {
    41  		r0 = ret.Get(0).(int32)
    42  	}
    43  
    44  	var r1 error
    45  	if rf, ok := ret.Get(1).(func(string) error); ok {
    46  		r1 = rf(ip)
    47  	} else {
    48  		r1 = ret.Error(1)
    49  	}
    50  
    51  	return r0, r1
    52  }
    53  
    54  // GetSentinelMonitor provides a mock function with given fields: ip
    55  func (_m *Client) GetSentinelMonitor(ip string) (string, string, error) {
    56  	ret := _m.Called(ip)
    57  
    58  	var r0 string
    59  	if rf, ok := ret.Get(0).(func(string) string); ok {
    60  		r0 = rf(ip)
    61  	} else {
    62  		r0 = ret.Get(0).(string)
    63  	}
    64  
    65  	var r1 string
    66  	if rf, ok := ret.Get(1).(func(string) string); ok {
    67  		r1 = rf(ip)
    68  	} else {
    69  		r1 = ret.Get(1).(string)
    70  	}
    71  
    72  	var r2 error
    73  	if rf, ok := ret.Get(2).(func(string) error); ok {
    74  		r2 = rf(ip)
    75  	} else {
    76  		r2 = ret.Error(2)
    77  	}
    78  
    79  	return r0, r1, r2
    80  }
    81  
    82  // GetSlaveOf provides a mock function with given fields: ip, port, password
    83  func (_m *Client) GetSlaveOf(ip string, port string, password string) (string, error) {
    84  	ret := _m.Called(ip, port, password)
    85  
    86  	var r0 string
    87  	if rf, ok := ret.Get(0).(func(string, string, string) string); ok {
    88  		r0 = rf(ip, port, password)
    89  	} else {
    90  		r0 = ret.Get(0).(string)
    91  	}
    92  
    93  	var r1 error
    94  	if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
    95  		r1 = rf(ip, port, password)
    96  	} else {
    97  		r1 = ret.Error(1)
    98  	}
    99  
   100  	return r0, r1
   101  }
   102  
   103  // IsMaster provides a mock function with given fields: ip, port, password
   104  func (_m *Client) IsMaster(ip string, port string, password string) (bool, error) {
   105  	ret := _m.Called(ip, port, password)
   106  
   107  	var r0 bool
   108  	if rf, ok := ret.Get(0).(func(string, string, string) bool); ok {
   109  		r0 = rf(ip, port, password)
   110  	} else {
   111  		r0 = ret.Get(0).(bool)
   112  	}
   113  
   114  	var r1 error
   115  	if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
   116  		r1 = rf(ip, port, password)
   117  	} else {
   118  		r1 = ret.Error(1)
   119  	}
   120  
   121  	return r0, r1
   122  }
   123  
   124  // MakeMaster provides a mock function with given fields: ip, port, password
   125  func (_m *Client) MakeMaster(ip string, port string, password string) error {
   126  	ret := _m.Called(ip, port, password)
   127  
   128  	var r0 error
   129  	if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
   130  		r0 = rf(ip, port, password)
   131  	} else {
   132  		r0 = ret.Error(0)
   133  	}
   134  
   135  	return r0
   136  }
   137  
   138  // MakeSlaveOf provides a mock function with given fields: ip, masterIP, password
   139  func (_m *Client) MakeSlaveOf(ip string, masterIP string, password string) error {
   140  	ret := _m.Called(ip, masterIP, password)
   141  
   142  	var r0 error
   143  	if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
   144  		r0 = rf(ip, masterIP, password)
   145  	} else {
   146  		r0 = ret.Error(0)
   147  	}
   148  
   149  	return r0
   150  }
   151  
   152  // MakeSlaveOfWithPort provides a mock function with given fields: ip, masterIP, masterPort, password
   153  func (_m *Client) MakeSlaveOfWithPort(ip string, masterIP string, masterPort string, password string) error {
   154  	ret := _m.Called(ip, masterIP, masterPort, password)
   155  
   156  	var r0 error
   157  	if rf, ok := ret.Get(0).(func(string, string, string, string) error); ok {
   158  		r0 = rf(ip, masterIP, masterPort, password)
   159  	} else {
   160  		r0 = ret.Error(0)
   161  	}
   162  
   163  	return r0
   164  }
   165  
   166  // MonitorRedis provides a mock function with given fields: ip, monitor, quorum, password
   167  func (_m *Client) MonitorRedis(ip string, monitor string, quorum string, password string) error {
   168  	ret := _m.Called(ip, monitor, quorum, password)
   169  
   170  	var r0 error
   171  	if rf, ok := ret.Get(0).(func(string, string, string, string) error); ok {
   172  		r0 = rf(ip, monitor, quorum, password)
   173  	} else {
   174  		r0 = ret.Error(0)
   175  	}
   176  
   177  	return r0
   178  }
   179  
   180  // MonitorRedisWithPort provides a mock function with given fields: ip, monitor, port, quorum, password
   181  func (_m *Client) MonitorRedisWithPort(ip string, monitor string, port string, quorum string, password string) error {
   182  	ret := _m.Called(ip, monitor, port, quorum, password)
   183  
   184  	var r0 error
   185  	if rf, ok := ret.Get(0).(func(string, string, string, string, string) error); ok {
   186  		r0 = rf(ip, monitor, port, quorum, password)
   187  	} else {
   188  		r0 = ret.Error(0)
   189  	}
   190  
   191  	return r0
   192  }
   193  
   194  // ResetSentinel provides a mock function with given fields: ip
   195  func (_m *Client) ResetSentinel(ip string) error {
   196  	ret := _m.Called(ip)
   197  
   198  	var r0 error
   199  	if rf, ok := ret.Get(0).(func(string) error); ok {
   200  		r0 = rf(ip)
   201  	} else {
   202  		r0 = ret.Error(0)
   203  	}
   204  
   205  	return r0
   206  }
   207  
   208  // SentinelCheckQuorum provides a mock function with given fields: ip
   209  func (_m *Client) SentinelCheckQuorum(ip string) error {
   210  	ret := _m.Called(ip)
   211  
   212  	var r0 error
   213  	if rf, ok := ret.Get(0).(func(string) error); ok {
   214  		r0 = rf(ip)
   215  	} else {
   216  		r0 = ret.Error(0)
   217  	}
   218  
   219  	return r0
   220  }
   221  
   222  // SetCustomRedisConfig provides a mock function with given fields: ip, port, configs, password
   223  func (_m *Client) SetCustomRedisConfig(ip string, port string, configs []string, password string) error {
   224  	ret := _m.Called(ip, port, configs, password)
   225  
   226  	var r0 error
   227  	if rf, ok := ret.Get(0).(func(string, string, []string, string) error); ok {
   228  		r0 = rf(ip, port, configs, password)
   229  	} else {
   230  		r0 = ret.Error(0)
   231  	}
   232  
   233  	return r0
   234  }
   235  
   236  // SetCustomSentinelConfig provides a mock function with given fields: ip, configs
   237  func (_m *Client) SetCustomSentinelConfig(ip string, configs []string) error {
   238  	ret := _m.Called(ip, configs)
   239  
   240  	var r0 error
   241  	if rf, ok := ret.Get(0).(func(string, []string) error); ok {
   242  		r0 = rf(ip, configs)
   243  	} else {
   244  		r0 = ret.Error(0)
   245  	}
   246  
   247  	return r0
   248  }
   249  
   250  // SlaveIsReady provides a mock function with given fields: ip, port, password
   251  func (_m *Client) SlaveIsReady(ip string, port string, password string) (bool, error) {
   252  	ret := _m.Called(ip, port, password)
   253  
   254  	var r0 bool
   255  	if rf, ok := ret.Get(0).(func(string, string, string) bool); ok {
   256  		r0 = rf(ip, port, password)
   257  	} else {
   258  		r0 = ret.Get(0).(bool)
   259  	}
   260  
   261  	var r1 error
   262  	if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
   263  		r1 = rf(ip, port, password)
   264  	} else {
   265  		r1 = ret.Error(1)
   266  	}
   267  
   268  	return r0, r1
   269  }
   270  
   271  type mockConstructorTestingTNewClient interface {
   272  	mock.TestingT
   273  	Cleanup(func())
   274  }
   275  
   276  // NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   277  func NewClient(t mockConstructorTestingTNewClient) *Client {
   278  	mock := &Client{}
   279  	mock.Mock.Test(t)
   280  
   281  	t.Cleanup(func() { mock.AssertExpectations(t) })
   282  
   283  	return mock
   284  }