mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
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:
parent
4e890e9daf
commit
1ae2afe208
@ -9,7 +9,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// defaultVaultBackendPath is the default VAULT_BACKEND_PATH for secrets
|
// defaultVaultBackendPath is the default VAULT_BACKEND_PATH for secrets.
|
||||||
defaultVaultBackendPath = "secret/"
|
defaultVaultBackendPath = "secret/"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1212,9 +1212,9 @@ func waitForJobCompletion(c kubernetes.Interface, ns, job string, timeout int) e
|
|||||||
type kubectlAction string
|
type kubectlAction string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// kubectlCreate tells retryKubectlInput() to run "create"
|
// kubectlCreate tells retryKubectlInput() to run "create".
|
||||||
kubectlCreate = kubectlAction("create")
|
kubectlCreate = kubectlAction("create")
|
||||||
// kubectlDelete tells retryKubectlInput() to run "delete"
|
// kubectlDelete tells retryKubectlInput() to run "delete".
|
||||||
kubectlDelete = kubectlAction("delete")
|
kubectlDelete = kubectlAction("delete")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestCloneStateToError(t *testing.T) {
|
func TestCloneStateToError(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
errorState := make(map[cephFSCloneState]error)
|
errorState := make(map[cephFSCloneState]error)
|
||||||
errorState[cephFSCloneComplete] = nil
|
errorState[cephFSCloneComplete] = nil
|
||||||
errorState[cephFSCloneError] = ErrInvalidClone
|
errorState[cephFSCloneError] = ErrInvalidClone
|
||||||
|
@ -162,7 +162,7 @@ func healerStageTransaction(ctx context.Context, cr *util.Credentials, volOps *r
|
|||||||
// - Create the staging file/directory under staging path
|
// - Create the staging file/directory under staging path
|
||||||
// - Stage the device (mount the device mapped for image)
|
// - Stage the device (mount the device mapped for image)
|
||||||
// TODO: make this function less complex.
|
// TODO: make this function less complex.
|
||||||
// nolint:gocyclo // reduce complexity
|
// nolint:gocyclo,cyclop // reduce complexity
|
||||||
func (ns *NodeServer) NodeStageVolume(
|
func (ns *NodeServer) NodeStageVolume(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error) {
|
req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error) {
|
||||||
|
@ -74,7 +74,7 @@ func (cp *ConnPool) fakeGet(monitors, user, keyfile string) (*rados.Conn, string
|
|||||||
return conn, unique, nil
|
return conn, unique, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// nolint:paralleltest,tparallel
|
// nolint:paralleltest // these tests cannot run in parallel
|
||||||
func TestConnPool(t *testing.T) {
|
func TestConnPool(t *testing.T) {
|
||||||
cp := NewConnPool(interval, expiry)
|
cp := NewConnPool(interval, expiry)
|
||||||
defer cp.Destroy()
|
defer cp.Destroy()
|
||||||
|
@ -42,10 +42,10 @@ const (
|
|||||||
kmsTypeSecretsMetadata = "metadata"
|
kmsTypeSecretsMetadata = "metadata"
|
||||||
|
|
||||||
// metadataSecretNameKey contains the key which corresponds to the
|
// 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"
|
metadataSecretNameKey = "secretName"
|
||||||
// metadataSecretNamespaceKey contains the key which corresponds to the
|
// 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"
|
metadataSecretNamespaceKey = "secretNamespace"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestVaultTenantSAKMSRegistered(t *testing.T) {
|
func TestVaultTenantSAKMSRegistered(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
_, ok := kmsManager.providers[kmsTypeVaultTenantSA]
|
_, ok := kmsManager.providers[kmsTypeVaultTenantSA]
|
||||||
assert.True(t, ok)
|
assert.True(t, ok)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user