fix unused linter

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
Tim Ramlot 2024-04-29 15:29:00 +02:00
parent 31eec1f8ab
commit 042f59d283
No known key found for this signature in database
GPG Key ID: 47428728E0C2878D
9 changed files with 1 additions and 45 deletions

View File

@ -15,7 +15,6 @@ issues:
- forbidigo
- interfacebloat
- predeclared
- unused
- unconvert
- usestdlibvars
- noctx

View File

@ -47,6 +47,7 @@ var (
Key: "validkey",
}
// TODO (JS): Missing test for validCloudflareProvider
// nolint: unused
validCloudflareProvider = cmacme.ACMEIssuerDNS01ProviderCloudflare{
APIKey: &validSecretKeyRef,
Email: "valid",

View File

@ -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

View File

@ -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 {

View File

@ -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

View File

@ -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 {

View File

@ -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) {

View File

@ -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"

View File

@ -45,7 +45,6 @@ import (
type injectableTest struct {
makeInjectable func(namePrefix string) client.Object
getCAs func(runtime.Object) [][]byte
subject string
disabled string
}