mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
util: address golangci-lint issues
address golangci-lint issues in utils Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
8c4a38eec6
commit
4b7cafe821
@ -20,7 +20,7 @@ import (
|
||||
|
||||
kmsapi "github.com/ceph/ceph-csi/internal/kms"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestGetPassphraseFromKMS(t *testing.T) {
|
||||
@ -31,7 +31,7 @@ func TestGetPassphraseFromKMS(t *testing.T) {
|
||||
continue
|
||||
}
|
||||
kms := kmsapi.GetKMSTestDummy(provider.UniqueID)
|
||||
assert.NotNil(t, kms)
|
||||
require.NotNil(t, kms)
|
||||
|
||||
volEnc, err := NewVolumeEncryption(provider.UniqueID, kms)
|
||||
if errors.Is(err, ErrDEKStoreNeeded) {
|
||||
@ -40,14 +40,14 @@ func TestGetPassphraseFromKMS(t *testing.T) {
|
||||
continue // currently unsupported by fscrypt integration
|
||||
}
|
||||
}
|
||||
assert.NotNil(t, volEnc)
|
||||
require.NotNil(t, volEnc)
|
||||
|
||||
if kms.RequiresDEKStore() == kmsapi.DEKStoreIntegrated {
|
||||
continue
|
||||
}
|
||||
|
||||
secret, err := kms.GetSecret(context.TODO(), "")
|
||||
assert.NoError(t, err, provider.UniqueID)
|
||||
assert.NotEmpty(t, secret, provider.UniqueID)
|
||||
require.NoError(t, err, provider.UniqueID)
|
||||
require.NotEmpty(t, secret, provider.UniqueID)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user