Update tests after adding new LastPrivateKeyHash field in status of issuer CRDs
Signed-off-by: vidarno <>
This commit is contained in:
parent
92da674e9a
commit
f7390903be
@ -34,7 +34,7 @@ type FakeRegistry struct {
|
||||
RemoveClientFunc func(uid string)
|
||||
GetClientFunc func(uid string) (acmecl.Interface, error)
|
||||
ListClientsFunc func() map[string]acmecl.Interface
|
||||
IsKeyCheckSumCachedFunc func(uid string, privateKey *rsa.PrivateKey) bool
|
||||
IsKeyCheckSumCachedFunc func(lastPrivateKeyHash string, privateKey *rsa.PrivateKey) bool
|
||||
}
|
||||
|
||||
func (f *FakeRegistry) AddClient(client *http.Client, uid string, config cmacme.ACMEIssuer, privateKey *rsa.PrivateKey, userAgent string) {
|
||||
@ -53,6 +53,6 @@ func (f *FakeRegistry) ListClients() map[string]acmecl.Interface {
|
||||
return f.ListClientsFunc()
|
||||
}
|
||||
|
||||
func (f *FakeRegistry) IsKeyCheckSumCached(uid string, privateKey *rsa.PrivateKey) bool {
|
||||
return f.IsKeyCheckSumCachedFunc(uid, privateKey)
|
||||
func (f *FakeRegistry) IsKeyCheckSumCached(lastPrivateKeyHash string, privateKey *rsa.PrivateKey) bool {
|
||||
return f.IsKeyCheckSumCachedFunc(lastPrivateKeyHash, privateKey)
|
||||
}
|
||||
|
||||
@ -253,6 +253,7 @@ func TestAcme_Setup(t *testing.T) {
|
||||
gen.SetIssuerACMEAccountURL(acmev2Prod),
|
||||
gen.SetIssuerACMEEmail(someEmail),
|
||||
gen.SetIssuerACMELastRegisteredEmail(someEmail),
|
||||
gen.SetIssuerACMELastPrivateKeyHash(someString),
|
||||
gen.AddIssuerCondition(
|
||||
*gen.IssuerConditionFrom(readyTrueCondition,
|
||||
gen.SetIssuerConditionStatus(cmmeta.ConditionTrue)))),
|
||||
@ -538,7 +539,7 @@ func TestAcme_Setup(t *testing.T) {
|
||||
AddClientFunc: func(string, cmacme.ACMEIssuer, *rsa.PrivateKey, string) {
|
||||
addClientWasCalled = true
|
||||
},
|
||||
IsKeyCheckSumCachedFunc: func(uid string, privateKey *rsa.PrivateKey) bool {
|
||||
IsKeyCheckSumCachedFunc: func(lastPrivateKeyHash string, privateKey *rsa.PrivateKey) bool {
|
||||
return true
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user