2022-06-17 09:24:43 +00:00
// Code generated by mockery v2.12.0. DO NOT EDIT.
2022-04-14 13:26:14 +00:00
package connectca
import (
acl "github.com/hashicorp/consul/acl"
mock "github.com/stretchr/testify/mock"
structs "github.com/hashicorp/consul/agent/structs"
2022-04-21 14:48:21 +00:00
testing "testing"
2022-04-14 13:26:14 +00:00
x509 "crypto/x509"
)
// MockCAManager is an autogenerated mock type for the CAManager type
type MockCAManager struct {
mock . Mock
}
// AuthorizeAndSignCertificate provides a mock function with given fields: csr, authz
func ( _m * MockCAManager ) AuthorizeAndSignCertificate ( csr * x509 . CertificateRequest , authz acl . Authorizer ) ( * structs . IssuedCert , error ) {
ret := _m . Called ( csr , authz )
var r0 * structs . IssuedCert
if rf , ok := ret . Get ( 0 ) . ( func ( * x509 . CertificateRequest , acl . Authorizer ) * structs . IssuedCert ) ; ok {
r0 = rf ( csr , authz )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * structs . IssuedCert )
}
}
var r1 error
if rf , ok := ret . Get ( 1 ) . ( func ( * x509 . CertificateRequest , acl . Authorizer ) error ) ; ok {
r1 = rf ( csr , authz )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-04-21 14:48:21 +00:00
2022-06-17 09:24:43 +00:00
// NewMockCAManager creates a new instance of MockCAManager. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
2022-04-21 14:48:21 +00:00
func NewMockCAManager ( t testing . TB ) * MockCAManager {
mock := & MockCAManager { }
2022-06-17 09:24:43 +00:00
mock . Mock . Test ( t )
2022-04-21 14:48:21 +00:00
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}