mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-09-05 15:47:02 +00:00
- Two of the linters changed their names - Updated code and nolint comments to make all linters pass with 1.44.2 - Added a new hack/install-linter.sh script to help developers install the expected version of the linter for local development
This commit is contained in:
@@ -51,7 +51,7 @@ func TestImpersonatorConfigControllerOptions(t *testing.T) {
|
||||
spec.Run(t, "options", func(t *testing.T, when spec.G, it spec.S) {
|
||||
const installedInNamespace = "some-namespace"
|
||||
const impersonationProxyPort = 8444
|
||||
const credentialIssuerResourceName = "some-credential-issuer-resource-name"
|
||||
const credentialIssuerResourceName = "some-credential-issuer-resource-name" //nolint:gosec // this is not a credential
|
||||
const generatedLoadBalancerServiceName = "some-service-resource-name"
|
||||
const generatedClusterIPServiceName = "some-cluster-ip-resource-name"
|
||||
const tlsSecretName = "some-tls-secret-name" //nolint:gosec // this is not a credential
|
||||
@@ -254,7 +254,7 @@ func TestImpersonatorConfigControllerSync(t *testing.T) {
|
||||
spec.Run(t, "Sync", func(t *testing.T, when spec.G, it spec.S) {
|
||||
const installedInNamespace = "some-namespace"
|
||||
const impersonationProxyPort = 8444
|
||||
const credentialIssuerResourceName = "some-credential-issuer-resource-name"
|
||||
const credentialIssuerResourceName = "some-credential-issuer-resource-name" //nolint:gosec // this is not a credential
|
||||
const loadBalancerServiceName = "some-service-resource-name"
|
||||
const clusterIPServiceName = "some-cluster-ip-resource-name"
|
||||
const tlsSecretName = "some-tls-secret-name" //nolint:gosec // this is not a credential
|
||||
@@ -461,7 +461,7 @@ func TestImpersonatorConfigControllerSync(t *testing.T) {
|
||||
rootCAs := x509.NewCertPool()
|
||||
rootCAs.AppendCertsFromPEM(caCrt)
|
||||
tr = &http.Transport{
|
||||
TLSClientConfig: &tls.Config{
|
||||
TLSClientConfig: &tls.Config{ //nolint:gosec // not concerned with TLS MinVersion here
|
||||
// Server's TLS serving cert CA
|
||||
RootCAs: rootCAs,
|
||||
// Client cert which is supposed to work against the server's dynamic CAContentProvider
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2020-2021 the Pinniped contributors. All Rights Reserved.
|
||||
// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package supervisorconfig
|
||||
@@ -51,7 +51,7 @@ const (
|
||||
|
||||
// generateKey is stubbed out for the purpose of testing. The default behavior is to generate an EC key.
|
||||
//nolint:gochecknoglobals
|
||||
var generateKey func(r io.Reader) (interface{}, error) = generateECKey
|
||||
var generateKey = generateECKey
|
||||
|
||||
func generateECKey(r io.Reader) (interface{}, error) {
|
||||
return ecdsa.GenerateKey(elliptic.P256(), r)
|
||||
|
||||
@@ -53,7 +53,7 @@ const (
|
||||
oidcValidatorCacheTTL = 15 * time.Minute
|
||||
|
||||
// Constants related to conditions.
|
||||
typeClientCredentialsValid = "ClientCredentialsValid"
|
||||
typeClientCredentialsValid = "ClientCredentialsValid" //nolint:gosec // this is not a credential
|
||||
typeAdditionalAuthorizeParametersValid = "AdditionalAuthorizeParametersValid"
|
||||
typeOIDCDiscoverySucceeded = "OIDCDiscoverySucceeded"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user