From fde0a0010c64caef75f297d911e0e390a7aa800f Mon Sep 17 00:00:00 2001 From: James Munnelly Date: Wed, 4 Apr 2018 23:38:19 +0100 Subject: [PATCH] Add missing GetOrder function to FakeACME --- pkg/issuer/acme/client/fake.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/issuer/acme/client/fake.go b/pkg/issuer/acme/client/fake.go index d4acbd676..220207ebc 100644 --- a/pkg/issuer/acme/client/fake.go +++ b/pkg/issuer/acme/client/fake.go @@ -20,6 +20,7 @@ type FakeACME struct { FakeGetAuthorization func(ctx context.Context, url string) (*acme.Authorization, error) FakeWaitAuthorization func(ctx context.Context, url string) (*acme.Authorization, error) FakeCreateAccount func(ctx context.Context, a *acme.Account) (*acme.Account, error) + FakeGetAccount func(ctx context.Context) (*acme.Account, error) FakeHTTP01ChallengeResponse func(token string) (string, error) FakeDNS01ChallengeRecord func(token string) (string, error) } @@ -80,6 +81,13 @@ func (f *FakeACME) CreateAccount(ctx context.Context, a *acme.Account) (*acme.Ac return nil, fmt.Errorf("CreateAccount not implemented") } +func (f *FakeACME) GetAccount(ctx context.Context) (*acme.Account, error) { + if f.FakeGetAccount != nil { + return f.FakeGetAccount(ctx) + } + return nil, fmt.Errorf("GetAccount not implemented") +} + func (f *FakeACME) HTTP01ChallengeResponse(token string) (string, error) { if f.FakeHTTP01ChallengeResponse != nil { return f.FakeHTTP01ChallengeResponse(token)