open-consul/agent/grpc-external/services/acl/mock_Login.go

54 lines
1.5 KiB
Go

// Code generated by mockery v2.15.0. DO NOT EDIT.
package acl
import (
authmethod "github.com/hashicorp/consul/agent/consul/authmethod"
mock "github.com/stretchr/testify/mock"
structs "github.com/hashicorp/consul/agent/structs"
)
// MockLogin is an autogenerated mock type for the Login type
type MockLogin struct {
mock.Mock
}
// TokenForVerifiedIdentity provides a mock function with given fields: identity, authMethod, description
func (_m *MockLogin) TokenForVerifiedIdentity(identity *authmethod.Identity, authMethod *structs.ACLAuthMethod, description string) (*structs.ACLToken, error) {
ret := _m.Called(identity, authMethod, description)
var r0 *structs.ACLToken
if rf, ok := ret.Get(0).(func(*authmethod.Identity, *structs.ACLAuthMethod, string) *structs.ACLToken); ok {
r0 = rf(identity, authMethod, description)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*structs.ACLToken)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*authmethod.Identity, *structs.ACLAuthMethod, string) error); ok {
r1 = rf(identity, authMethod, description)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type mockConstructorTestingTNewMockLogin interface {
mock.TestingT
Cleanup(func())
}
// NewMockLogin creates a new instance of MockLogin. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockLogin(t mockConstructorTestingTNewMockLogin) *MockLogin {
mock := &MockLogin{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}