// Code generated by mockery v2.37.1. DO NOT EDIT. package mockpbconnectca import ( context "context" pbconnectca "github.com/hashicorp/consul/proto-public/pbconnectca" mock "github.com/stretchr/testify/mock" ) // ConnectCAServiceServer is an autogenerated mock type for the ConnectCAServiceServer type type ConnectCAServiceServer struct { mock.Mock } type ConnectCAServiceServer_Expecter struct { mock *mock.Mock } func (_m *ConnectCAServiceServer) EXPECT() *ConnectCAServiceServer_Expecter { return &ConnectCAServiceServer_Expecter{mock: &_m.Mock} } // Sign provides a mock function with given fields: _a0, _a1 func (_m *ConnectCAServiceServer) Sign(_a0 context.Context, _a1 *pbconnectca.SignRequest) (*pbconnectca.SignResponse, error) { ret := _m.Called(_a0, _a1) var r0 *pbconnectca.SignResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *pbconnectca.SignRequest) (*pbconnectca.SignResponse, error)); ok { return rf(_a0, _a1) } if rf, ok := ret.Get(0).(func(context.Context, *pbconnectca.SignRequest) *pbconnectca.SignResponse); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*pbconnectca.SignResponse) } } if rf, ok := ret.Get(1).(func(context.Context, *pbconnectca.SignRequest) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) } return r0, r1 } // ConnectCAServiceServer_Sign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sign' type ConnectCAServiceServer_Sign_Call struct { *mock.Call } // Sign is a helper method to define mock.On call // - _a0 context.Context // - _a1 *pbconnectca.SignRequest func (_e *ConnectCAServiceServer_Expecter) Sign(_a0 interface{}, _a1 interface{}) *ConnectCAServiceServer_Sign_Call { return &ConnectCAServiceServer_Sign_Call{Call: _e.mock.On("Sign", _a0, _a1)} } func (_c *ConnectCAServiceServer_Sign_Call) Run(run func(_a0 context.Context, _a1 *pbconnectca.SignRequest)) *ConnectCAServiceServer_Sign_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*pbconnectca.SignRequest)) }) return _c } func (_c *ConnectCAServiceServer_Sign_Call) Return(_a0 *pbconnectca.SignResponse, _a1 error) *ConnectCAServiceServer_Sign_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *ConnectCAServiceServer_Sign_Call) RunAndReturn(run func(context.Context, *pbconnectca.SignRequest) (*pbconnectca.SignResponse, error)) *ConnectCAServiceServer_Sign_Call { _c.Call.Return(run) return _c } // WatchRoots provides a mock function with given fields: _a0, _a1 func (_m *ConnectCAServiceServer) WatchRoots(_a0 *pbconnectca.WatchRootsRequest, _a1 pbconnectca.ConnectCAService_WatchRootsServer) error { ret := _m.Called(_a0, _a1) var r0 error if rf, ok := ret.Get(0).(func(*pbconnectca.WatchRootsRequest, pbconnectca.ConnectCAService_WatchRootsServer) error); ok { r0 = rf(_a0, _a1) } else { r0 = ret.Error(0) } return r0 } // ConnectCAServiceServer_WatchRoots_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchRoots' type ConnectCAServiceServer_WatchRoots_Call struct { *mock.Call } // WatchRoots is a helper method to define mock.On call // - _a0 *pbconnectca.WatchRootsRequest // - _a1 pbconnectca.ConnectCAService_WatchRootsServer func (_e *ConnectCAServiceServer_Expecter) WatchRoots(_a0 interface{}, _a1 interface{}) *ConnectCAServiceServer_WatchRoots_Call { return &ConnectCAServiceServer_WatchRoots_Call{Call: _e.mock.On("WatchRoots", _a0, _a1)} } func (_c *ConnectCAServiceServer_WatchRoots_Call) Run(run func(_a0 *pbconnectca.WatchRootsRequest, _a1 pbconnectca.ConnectCAService_WatchRootsServer)) *ConnectCAServiceServer_WatchRoots_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*pbconnectca.WatchRootsRequest), args[1].(pbconnectca.ConnectCAService_WatchRootsServer)) }) return _c } func (_c *ConnectCAServiceServer_WatchRoots_Call) Return(_a0 error) *ConnectCAServiceServer_WatchRoots_Call { _c.Call.Return(_a0) return _c } func (_c *ConnectCAServiceServer_WatchRoots_Call) RunAndReturn(run func(*pbconnectca.WatchRootsRequest, pbconnectca.ConnectCAService_WatchRootsServer) error) *ConnectCAServiceServer_WatchRoots_Call { _c.Call.Return(run) return _c } // NewConnectCAServiceServer creates a new instance of ConnectCAServiceServer. 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 NewConnectCAServiceServer(t interface { mock.TestingT Cleanup(func()) }) *ConnectCAServiceServer { mock := &ConnectCAServiceServer{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }