Skip to content

Commit

Permalink
e2e: add PVC-PVC clone Ceph FS fscrypt tests
Browse files Browse the repository at this point in the history
Note: Feature fixed https://tracker.ceph.com/issues/57641

Signed-off-by: Marcel Lauhoff <marcel.lauhoff@suse.com>
  • Loading branch information
Marcel Lauhoff committed Oct 20, 2022
1 parent 155c33a commit 60182d8
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions e2e/cephfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1635,6 +1635,42 @@ var _ = Describe(cephfsType, func() {
}
})

if testCephFSFscrypt {
kmsToTest := map[string]kmsConfig{
"secrets-metadata-test": secretsMetadataKMS,
"vault-test": vaultKMS,
}
for kmsId, kmsConf := range kmsToTest {
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
Expand Down

0 comments on commit 60182d8

Please sign in to comment.