diff --git a/e2e/kms.go b/e2e/kms.go index 1e1eee9d8..3942107e2 100644 --- a/e2e/kms.go +++ b/e2e/kms.go @@ -9,7 +9,7 @@ import ( ) const ( - // defaultVaultBackendPath is the default VAULT_BACKEND_PATH for secrets + // defaultVaultBackendPath is the default VAULT_BACKEND_PATH for secrets. defaultVaultBackendPath = "secret/" ) diff --git a/e2e/utils.go b/e2e/utils.go index ff1c4c4f8..780c4e7cb 100644 --- a/e2e/utils.go +++ b/e2e/utils.go @@ -1212,9 +1212,9 @@ func waitForJobCompletion(c kubernetes.Interface, ns, job string, timeout int) e type kubectlAction string const ( - // kubectlCreate tells retryKubectlInput() to run "create" + // kubectlCreate tells retryKubectlInput() to run "create". kubectlCreate = kubectlAction("create") - // kubectlDelete tells retryKubectlInput() to run "delete" + // kubectlDelete tells retryKubectlInput() to run "delete". kubectlDelete = kubectlAction("delete") ) diff --git a/internal/cephfs/clone_test.go b/internal/cephfs/clone_test.go index df59e472c..a5c88e467 100644 --- a/internal/cephfs/clone_test.go +++ b/internal/cephfs/clone_test.go @@ -23,6 +23,7 @@ import ( ) func TestCloneStateToError(t *testing.T) { + t.Parallel() errorState := make(map[cephFSCloneState]error) errorState[cephFSCloneComplete] = nil errorState[cephFSCloneError] = ErrInvalidClone diff --git a/internal/rbd/nodeserver.go b/internal/rbd/nodeserver.go index 2aeb85175..aee6a6ab2 100644 --- a/internal/rbd/nodeserver.go +++ b/internal/rbd/nodeserver.go @@ -162,7 +162,7 @@ func healerStageTransaction(ctx context.Context, cr *util.Credentials, volOps *r // - Create the staging file/directory under staging path // - Stage the device (mount the device mapped for image) // TODO: make this function less complex. -// nolint:gocyclo // reduce complexity +// nolint:gocyclo,cyclop // reduce complexity func (ns *NodeServer) NodeStageVolume( ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error) { diff --git a/internal/util/conn_pool_test.go b/internal/util/conn_pool_test.go index 229106006..39251f24c 100644 --- a/internal/util/conn_pool_test.go +++ b/internal/util/conn_pool_test.go @@ -74,7 +74,7 @@ func (cp *ConnPool) fakeGet(monitors, user, keyfile string) (*rados.Conn, string return conn, unique, nil } -// nolint:paralleltest,tparallel +// nolint:paralleltest // these tests cannot run in parallel func TestConnPool(t *testing.T) { cp := NewConnPool(interval, expiry) defer cp.Destroy() diff --git a/internal/util/secretskms.go b/internal/util/secretskms.go index 83b4eb8ed..879327983 100644 --- a/internal/util/secretskms.go +++ b/internal/util/secretskms.go @@ -42,10 +42,10 @@ const ( kmsTypeSecretsMetadata = "metadata" // metadataSecretNameKey contains the key which corresponds to the - // kubernetes secret name from where encryptionPassphrase is feteched + // kubernetes secret name from where encryptionPassphrase is feteched. metadataSecretNameKey = "secretName" // metadataSecretNamespaceKey contains the key which corresponds to the - // kubernetes secret namespace from where encryptionPassphrase is feteched + // kubernetes secret namespace from where encryptionPassphrase is feteched. metadataSecretNamespaceKey = "secretNamespace" ) diff --git a/internal/util/vault_sa_test.go b/internal/util/vault_sa_test.go index 76738fc3a..dfa89e235 100644 --- a/internal/util/vault_sa_test.go +++ b/internal/util/vault_sa_test.go @@ -23,6 +23,7 @@ import ( ) func TestVaultTenantSAKMSRegistered(t *testing.T) { + t.Parallel() _, ok := kmsManager.providers[kmsTypeVaultTenantSA] assert.True(t, ok) }