forked from TrueCloudLab/certificates
Fix linter errors
This commit is contained in:
parent
59c5219a07
commit
c77b4ff9c5
4 changed files with 13 additions and 9 deletions
|
@ -41,12 +41,15 @@ func (*fakeProvisioner) AuthorizeSign(ctx context.Context, token string) ([]prov
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
func (*fakeProvisioner) AuthorizeRevoke(ctx context.Context, token string) error { return nil }
|
||||
func (*fakeProvisioner) AuthorizeChallenge(ctx context.Context, challenge string) error { return nil }
|
||||
func (*fakeProvisioner) GetID() string { return "" }
|
||||
func (*fakeProvisioner) GetName() string { return "" }
|
||||
func (*fakeProvisioner) DefaultTLSCertDuration() time.Duration { return 0 }
|
||||
func (*fakeProvisioner) GetOptions() *provisioner.Options { return nil }
|
||||
func (*fakeProvisioner) AuthorizeChallenge(ctx context.Context, challenge provisioner.ACMEChallenge) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (*fakeProvisioner) AuthorizeRevoke(ctx context.Context, token string) error { return nil }
|
||||
func (*fakeProvisioner) GetID() string { return "" }
|
||||
func (*fakeProvisioner) GetName() string { return "" }
|
||||
func (*fakeProvisioner) DefaultTLSCertDuration() time.Duration { return 0 }
|
||||
func (*fakeProvisioner) GetOptions() *provisioner.Options { return nil }
|
||||
|
||||
func newProv() acme.Provisioner {
|
||||
// Initialize provisioners
|
||||
|
|
|
@ -725,7 +725,7 @@ func TestHandler_newAuthorization(t *testing.T) {
|
|||
ExpiresAt: clock.Now(),
|
||||
}
|
||||
deviceAttestProv := newProv()
|
||||
deviceAttestProv.(*provisioner.ACME).Challenges = []string{string(acme.DEVICEATTEST01)}
|
||||
deviceAttestProv.(*provisioner.ACME).Challenges = []provisioner.ACMEChallenge{provisioner.DEVICE_ATTEST_01}
|
||||
return test{
|
||||
prov: deviceAttestProv,
|
||||
db: &acme.MockDB{
|
||||
|
|
|
@ -110,7 +110,7 @@ type MockProvisioner struct {
|
|||
MauthorizeOrderIdentifier func(ctx context.Context, identifier provisioner.ACMEIdentifier) error
|
||||
MauthorizeSign func(ctx context.Context, ott string) ([]provisioner.SignOption, error)
|
||||
MauthorizeRevoke func(ctx context.Context, token string) error
|
||||
MauthorizeChallenge func(Ctx context.Context, challenge string) error
|
||||
MauthorizeChallenge func(Ctx context.Context, challenge provisioner.ACMEChallenge) error
|
||||
MdefaultTLSCertDuration func() time.Duration
|
||||
MgetOptions func() *provisioner.Options
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ func (m *MockProvisioner) AuthorizeRevoke(ctx context.Context, token string) err
|
|||
}
|
||||
|
||||
// AuthorizeChallenge mock
|
||||
func (m *MockProvisioner) AuthorizeChallenge(ctx context.Context, challenge string) error {
|
||||
func (m *MockProvisioner) AuthorizeChallenge(ctx context.Context, challenge provisioner.ACMEChallenge) error {
|
||||
if m.MauthorizeChallenge != nil {
|
||||
return m.MauthorizeChallenge(ctx, challenge)
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import (
|
|||
// ACMEChallenge represents the supported acme challenges.
|
||||
type ACMEChallenge string
|
||||
|
||||
// nolint:revive // better names
|
||||
const (
|
||||
// HTTP_01 is the http-01 ACME challenge.
|
||||
HTTP_01 ACMEChallenge = "http-01"
|
||||
|
|
Loading…
Reference in a new issue