1
0
mirror of https://codeberg.org/crowci/crow.git synced 2025-06-12 22:02:01 +03:00
Files
crow/pipeline/rpc/proto/mocks/mock_CrowAuthServer.go
2025-03-10 13:58:57 +01:00

129 lines
4.1 KiB
Go

// Code generated by mockery v2.53.0. DO NOT EDIT.
package proto
import (
context "context"
proto "codeberg.org/crowci/crow/v3/pipeline/rpc/proto"
mock "github.com/stretchr/testify/mock"
)
// MockCrowAuthServer is an autogenerated mock type for the CrowAuthServer type
type MockCrowAuthServer struct {
mock.Mock
}
type MockCrowAuthServer_Expecter struct {
mock *mock.Mock
}
func (_m *MockCrowAuthServer) EXPECT() *MockCrowAuthServer_Expecter {
return &MockCrowAuthServer_Expecter{mock: &_m.Mock}
}
// Auth provides a mock function with given fields: _a0, _a1
func (_m *MockCrowAuthServer) Auth(_a0 context.Context, _a1 *proto.AuthRequest) (*proto.AuthResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for Auth")
}
var r0 *proto.AuthResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *proto.AuthRequest) (*proto.AuthResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *proto.AuthRequest) *proto.AuthResponse); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*proto.AuthResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *proto.AuthRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockCrowAuthServer_Auth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Auth'
type MockCrowAuthServer_Auth_Call struct {
*mock.Call
}
// Auth is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *proto.AuthRequest
func (_e *MockCrowAuthServer_Expecter) Auth(_a0 interface{}, _a1 interface{}) *MockCrowAuthServer_Auth_Call {
return &MockCrowAuthServer_Auth_Call{Call: _e.mock.On("Auth", _a0, _a1)}
}
func (_c *MockCrowAuthServer_Auth_Call) Run(run func(_a0 context.Context, _a1 *proto.AuthRequest)) *MockCrowAuthServer_Auth_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*proto.AuthRequest))
})
return _c
}
func (_c *MockCrowAuthServer_Auth_Call) Return(_a0 *proto.AuthResponse, _a1 error) *MockCrowAuthServer_Auth_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockCrowAuthServer_Auth_Call) RunAndReturn(run func(context.Context, *proto.AuthRequest) (*proto.AuthResponse, error)) *MockCrowAuthServer_Auth_Call {
_c.Call.Return(run)
return _c
}
// mustEmbedUnimplementedCrowAuthServer provides a mock function with no fields
func (_m *MockCrowAuthServer) mustEmbedUnimplementedCrowAuthServer() {
_m.Called()
}
// MockCrowAuthServer_mustEmbedUnimplementedCrowAuthServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'mustEmbedUnimplementedCrowAuthServer'
type MockCrowAuthServer_mustEmbedUnimplementedCrowAuthServer_Call struct {
*mock.Call
}
// mustEmbedUnimplementedCrowAuthServer is a helper method to define mock.On call
func (_e *MockCrowAuthServer_Expecter) mustEmbedUnimplementedCrowAuthServer() *MockCrowAuthServer_mustEmbedUnimplementedCrowAuthServer_Call {
return &MockCrowAuthServer_mustEmbedUnimplementedCrowAuthServer_Call{Call: _e.mock.On("mustEmbedUnimplementedCrowAuthServer")}
}
func (_c *MockCrowAuthServer_mustEmbedUnimplementedCrowAuthServer_Call) Run(run func()) *MockCrowAuthServer_mustEmbedUnimplementedCrowAuthServer_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockCrowAuthServer_mustEmbedUnimplementedCrowAuthServer_Call) Return() *MockCrowAuthServer_mustEmbedUnimplementedCrowAuthServer_Call {
_c.Call.Return()
return _c
}
func (_c *MockCrowAuthServer_mustEmbedUnimplementedCrowAuthServer_Call) RunAndReturn(run func()) *MockCrowAuthServer_mustEmbedUnimplementedCrowAuthServer_Call {
_c.Run(run)
return _c
}
// NewMockCrowAuthServer creates a new instance of MockCrowAuthServer. 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 NewMockCrowAuthServer(t interface {
mock.TestingT
Cleanup(func())
}) *MockCrowAuthServer {
mock := &MockCrowAuthServer{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}