mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
util: move GetID() from EncryptionKMS to VolumeEncryption
There is no need for each EncryptionKMS to implement the same GetID() function. We have a VolumeEncryption type that is more suitable for keeping track of the KMS-ID that was used to get the configuration of the KMS. This does not change any metadata that is stored anywhere. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
9317e2afb4
commit
eea97ca014
@ -58,11 +58,11 @@ func TestKMSWorkflow(t *testing.T) {
|
||||
kms, err := GetKMS("tenant", defaultKMSType, secrets)
|
||||
assert.NoError(t, err)
|
||||
require.NotNil(t, kms)
|
||||
assert.Equal(t, defaultKMSType, kms.GetID())
|
||||
|
||||
ve, err := NewVolumeEncryption(kms)
|
||||
ve, err := NewVolumeEncryption("", kms)
|
||||
assert.NoError(t, err)
|
||||
require.NotNil(t, ve)
|
||||
assert.Equal(t, defaultKMSType, ve.GetID())
|
||||
|
||||
volumeID := "volume-id"
|
||||
|
||||
|
Reference in New Issue
Block a user