Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e: add test for validation of fuseMountOptions and kernelMountOptions #3970

Merged
merged 2 commits into from
Jul 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions e2e/cephfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,46 @@ var _ = Describe(cephfsType, func() {
}
})

By("validate fuseMountOptions", func() {
params := map[string]string{
"mounter": "fuse",
"fuseMountOptions": "default_permissions",
}
err := createCephfsStorageClass(f.ClientSet, f, true, params)
if err != nil {
framework.Failf("failed to create CephFS storageclass: %v", err)
}
mountFlags := []string{"default_permissions"}
err = checkMountOptions(pvcPath, appPath, f, mountFlags)
if err != nil {
framework.Failf("failed to validate fuse mount options: %v", err)
}
err = deleteResource(cephFSExamplePath + "storageclass.yaml")
if err != nil {
framework.Failf("failed to delete CephFS storageclass: %v", err)
}
})

By("validate kernelMountOptions", func() {
params := map[string]string{
"mounter": "kernel",
"kernelMountOptions": "nocrc",
}
err := createCephfsStorageClass(f.ClientSet, f, true, params)
if err != nil {
framework.Failf("failed to create CephFS storageclass: %v", err)
}
mountFlags := []string{"nocrc"}
err = checkMountOptions(pvcPath, appPath, f, mountFlags)
if err != nil {
framework.Failf("failed to validate kernel mount options: %v", err)
}
err = deleteResource(cephFSExamplePath + "storageclass.yaml")
if err != nil {
framework.Failf("failed to delete CephFS storageclass: %v", err)
}
})

By("verify generic ephemeral volume support", func() {
err := createCephfsStorageClass(f.ClientSet, f, true, nil)
if err != nil {
Expand Down