cleanup: modifies the error caused due to merged PRs

This commit modifies the error of godot, cyclop,
paralleltest linter caused due to merged PRs.

Updates: #1586

Signed-off-by: Yati Padia <ypadia@redhat.com>
This commit is contained in:
Yati Padia 2021-07-22 11:58:10 +05:30 committed by mergify[bot]
parent 4e890e9daf
commit 1ae2afe208
7 changed files with 9 additions and 7 deletions

View File

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

View File

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

View File

@ -23,6 +23,7 @@ import (
)
func TestCloneStateToError(t *testing.T) {
t.Parallel()
errorState := make(map[cephFSCloneState]error)
errorState[cephFSCloneComplete] = nil
errorState[cephFSCloneError] = ErrInvalidClone

View File

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

View File

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

View File

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

View File

@ -23,6 +23,7 @@ import (
)
func TestVaultTenantSAKMSRegistered(t *testing.T) {
t.Parallel()
_, ok := kmsManager.providers[kmsTypeVaultTenantSA]
assert.True(t, ok)
}