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,8 +41,11 @@ func (*fakeProvisioner) AuthorizeSign(ctx context.Context, token string) ([]prov
|
||||||
return nil, nil
|
return nil, 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) 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) GetID() string { return "" }
|
||||||
func (*fakeProvisioner) GetName() string { return "" }
|
func (*fakeProvisioner) GetName() string { return "" }
|
||||||
func (*fakeProvisioner) DefaultTLSCertDuration() time.Duration { return 0 }
|
func (*fakeProvisioner) DefaultTLSCertDuration() time.Duration { return 0 }
|
||||||
|
|
|
@ -725,7 +725,7 @@ func TestHandler_newAuthorization(t *testing.T) {
|
||||||
ExpiresAt: clock.Now(),
|
ExpiresAt: clock.Now(),
|
||||||
}
|
}
|
||||||
deviceAttestProv := newProv()
|
deviceAttestProv := newProv()
|
||||||
deviceAttestProv.(*provisioner.ACME).Challenges = []string{string(acme.DEVICEATTEST01)}
|
deviceAttestProv.(*provisioner.ACME).Challenges = []provisioner.ACMEChallenge{provisioner.DEVICE_ATTEST_01}
|
||||||
return test{
|
return test{
|
||||||
prov: deviceAttestProv,
|
prov: deviceAttestProv,
|
||||||
db: &acme.MockDB{
|
db: &acme.MockDB{
|
||||||
|
|
|
@ -110,7 +110,7 @@ type MockProvisioner struct {
|
||||||
MauthorizeOrderIdentifier func(ctx context.Context, identifier provisioner.ACMEIdentifier) error
|
MauthorizeOrderIdentifier func(ctx context.Context, identifier provisioner.ACMEIdentifier) error
|
||||||
MauthorizeSign func(ctx context.Context, ott string) ([]provisioner.SignOption, error)
|
MauthorizeSign func(ctx context.Context, ott string) ([]provisioner.SignOption, error)
|
||||||
MauthorizeRevoke func(ctx context.Context, token string) 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
|
MdefaultTLSCertDuration func() time.Duration
|
||||||
MgetOptions func() *provisioner.Options
|
MgetOptions func() *provisioner.Options
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ func (m *MockProvisioner) AuthorizeRevoke(ctx context.Context, token string) err
|
||||||
}
|
}
|
||||||
|
|
||||||
// AuthorizeChallenge mock
|
// 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 {
|
if m.MauthorizeChallenge != nil {
|
||||||
return m.MauthorizeChallenge(ctx, challenge)
|
return m.MauthorizeChallenge(ctx, challenge)
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import (
|
||||||
// ACMEChallenge represents the supported acme challenges.
|
// ACMEChallenge represents the supported acme challenges.
|
||||||
type ACMEChallenge string
|
type ACMEChallenge string
|
||||||
|
|
||||||
|
// nolint:revive // better names
|
||||||
const (
|
const (
|
||||||
// HTTP_01 is the http-01 ACME challenge.
|
// HTTP_01 is the http-01 ACME challenge.
|
||||||
HTTP_01 ACMEChallenge = "http-01"
|
HTTP_01 ACMEChallenge = "http-01"
|
||||||
|
|
Loading…
Reference in a new issue