fix unused linter
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
parent
31eec1f8ab
commit
042f59d283
@ -15,7 +15,6 @@ issues:
|
||||
- forbidigo
|
||||
- interfacebloat
|
||||
- predeclared
|
||||
- unused
|
||||
- unconvert
|
||||
- usestdlibvars
|
||||
- noctx
|
||||
|
||||
@ -47,6 +47,7 @@ var (
|
||||
Key: "validkey",
|
||||
}
|
||||
// TODO (JS): Missing test for validCloudflareProvider
|
||||
// nolint: unused
|
||||
validCloudflareProvider = cmacme.ACMEIssuerDNS01ProviderCloudflare{
|
||||
APIKey: &validSecretKeyRef,
|
||||
Email: "valid",
|
||||
|
||||
@ -29,11 +29,6 @@ import (
|
||||
"github.com/cert-manager/cert-manager/test/unit/gen"
|
||||
)
|
||||
|
||||
const (
|
||||
randomFinalizer = "random.acme.cert-manager.io"
|
||||
maxConcurrentChallenges = 60
|
||||
)
|
||||
|
||||
func TestRunScheduler(t *testing.T) {
|
||||
tests := map[string]struct {
|
||||
maxConcurrentChallenges int
|
||||
|
||||
@ -19,7 +19,6 @@ package controller
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
k8sErrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@ -36,12 +35,6 @@ import (
|
||||
|
||||
const (
|
||||
ControllerName = "gateway-shim"
|
||||
|
||||
// resyncPeriod is set to 10 hours across cert-manager. These 10 hours come
|
||||
// from a discussion on the controller-runtime project that boils down to:
|
||||
// never change this without an explicit reason.
|
||||
// https://github.com/kubernetes-sigs/controller-runtime/pull/88#issuecomment-408500629
|
||||
resyncPeriod = 10 * time.Hour
|
||||
)
|
||||
|
||||
type controller struct {
|
||||
|
||||
@ -19,7 +19,6 @@ package shimhelper
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/go-logr/logr"
|
||||
@ -3264,17 +3263,6 @@ func TestSync(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
type fakeHelper struct {
|
||||
issuer cmapi.GenericIssuer
|
||||
}
|
||||
|
||||
func (f *fakeHelper) GetGenericIssuer(ref cmmeta.ObjectReference, ns string) (cmapi.GenericIssuer, error) {
|
||||
if f.issuer == nil {
|
||||
return nil, fmt.Errorf("no issuer specified on fake helper")
|
||||
}
|
||||
return f.issuer, nil
|
||||
}
|
||||
|
||||
func TestIssuerForIngress(t *testing.T) {
|
||||
type testT struct {
|
||||
Ingress *networkingv1.Ingress
|
||||
|
||||
@ -18,8 +18,6 @@ package vault
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto"
|
||||
"crypto/x509"
|
||||
"fmt"
|
||||
|
||||
certificatesv1 "k8s.io/api/certificates/v1"
|
||||
@ -44,8 +42,6 @@ const (
|
||||
CSRControllerName = "certificatesigningrequests-issuer-vault"
|
||||
)
|
||||
|
||||
type signingFn func(*x509.Certificate, *x509.Certificate, crypto.PublicKey, interface{}) ([]byte, *x509.Certificate, error)
|
||||
|
||||
// Vault is a controller for signing Kubernetes CertificateSigningRequest
|
||||
// using Vault Issuers.
|
||||
type Vault struct {
|
||||
|
||||
@ -141,15 +141,6 @@ func (k printKeyUsage) String() string {
|
||||
return sb.String()
|
||||
}
|
||||
|
||||
// Deprecated: use CertificateTemplateValidateAndOverrideKeyUsages instead.
|
||||
func certificateTemplateOverrideKeyUsages(keyUsage x509.KeyUsage, extKeyUsage []x509.ExtKeyUsage) CertificateTemplateValidatorMutator {
|
||||
return func(req *x509.CertificateRequest, cert *x509.Certificate) error {
|
||||
cert.KeyUsage = keyUsage
|
||||
cert.ExtKeyUsage = extKeyUsage
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// CertificateTemplateFromCSR will create a x509.Certificate for the
|
||||
// given *x509.CertificateRequest.
|
||||
func CertificateTemplateFromCSR(csr *x509.CertificateRequest, validatorMutators ...CertificateTemplateValidatorMutator) (*x509.Certificate, error) {
|
||||
|
||||
@ -24,7 +24,6 @@ import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
"github.com/cert-manager/cert-manager/e2e-tests/framework"
|
||||
"github.com/cert-manager/cert-manager/e2e-tests/framework/addon"
|
||||
"github.com/cert-manager/cert-manager/e2e-tests/suite/issuers/acme/dnsproviders"
|
||||
"github.com/cert-manager/cert-manager/e2e-tests/util"
|
||||
cmacme "github.com/cert-manager/cert-manager/pkg/apis/acme/v1"
|
||||
@ -36,11 +35,6 @@ import (
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
type dns01Provider interface {
|
||||
Details() *dnsproviders.Details
|
||||
addon.Addon
|
||||
}
|
||||
|
||||
const testingACMEEmail = "e2e@cert-manager.io"
|
||||
const testingACMEPrivateKey = "test-acme-private-key"
|
||||
|
||||
|
||||
@ -45,7 +45,6 @@ import (
|
||||
type injectableTest struct {
|
||||
makeInjectable func(namePrefix string) client.Object
|
||||
getCAs func(runtime.Object) [][]byte
|
||||
subject string
|
||||
disabled string
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user