mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
e2e: add PVC-PVC clone Ceph FS fscrypt tests
Note: Feature fixed https://tracker.ceph.com/issues/57641 Signed-off-by: Marcel Lauhoff <marcel.lauhoff@suse.com>
This commit is contained in:
parent
8d38107fd6
commit
a53a64129d
@ -1680,6 +1680,44 @@ var _ = Describe(cephfsType, func() {
|
||||
}
|
||||
})
|
||||
|
||||
if testCephFSFscrypt {
|
||||
kmsToTest := map[string]kmsConfig{
|
||||
"secrets-metadata-test": secretsMetadataKMS,
|
||||
"vault-test": vaultKMS,
|
||||
}
|
||||
for kmsID, kmsConf := range kmsToTest {
|
||||
kmsID := kmsID
|
||||
kmsConf := kmsConf
|
||||
By("create an encrypted PVC-PVC clone and bind it to an app with "+kmsID, func() {
|
||||
err := deleteResource(cephFSExamplePath + "storageclass.yaml")
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to delete storageclass: %v", err)
|
||||
}
|
||||
|
||||
scOpts := map[string]string{
|
||||
"encrypted": "true",
|
||||
"encryptionKMSID": kmsID,
|
||||
}
|
||||
|
||||
err = createCephfsStorageClass(f.ClientSet, f, true, scOpts)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to create CephFS storageclass: %v", err)
|
||||
}
|
||||
|
||||
validateFscryptClone(pvcPath, appPath, pvcSmartClonePath, appSmartClonePath, kmsConf, f)
|
||||
|
||||
err = deleteResource(cephFSExamplePath + "storageclass.yaml")
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to delete storageclass: %v", err)
|
||||
}
|
||||
err = createCephfsStorageClass(f.ClientSet, f, false, nil)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to create CephFS storageclass: %v", err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
By("create a PVC-PVC clone and bind it to an app", func() {
|
||||
var wg sync.WaitGroup
|
||||
totalCount := 3
|
||||
|
Loading…
Reference in New Issue
Block a user