diff --git a/e2e/libs/keywords/workload_keywords.py b/e2e/libs/keywords/workload_keywords.py index 51450df9e5..3bf9b09150 100644 --- a/e2e/libs/keywords/workload_keywords.py +++ b/e2e/libs/keywords/workload_keywords.py @@ -9,10 +9,12 @@ def __init__(self): def init_storageclasses(self): create_storageclass('longhorn-test') create_storageclass('longhorn-test-strict-local') + create_storageclass('longhorn-test-nfs-options') def cleanup_storageclasses(self): delete_storageclass('longhorn-test') delete_storageclass('longhorn-test-strict-local') + delete_storageclass('longhorn-test-nfs-options') def create_deployment(self, volume_type="rwo", option=""): create_pvc(volume_type, option) diff --git a/e2e/libs/workload/workload.py b/e2e/libs/workload/workload.py index f484077e45..436c7b45cc 100644 --- a/e2e/libs/workload/workload.py +++ b/e2e/libs/workload/workload.py @@ -23,6 +23,8 @@ def get_name_suffix(*args): def create_storageclass(name): if name == 'longhorn-test-strict-local': filepath = "./templates/workload/strict_local_storageclass.yaml" + elif name == 'longhorn-test-nfs-options': + filepath = "./templates/workload/storageclass-nfs-options.yaml" else: filepath = "./templates/workload/storageclass.yaml" diff --git a/e2e/templates/workload/storageclass_nfs_options.yaml b/e2e/templates/workload/storageclass_nfs_options.yaml new file mode 100644 index 0000000000..5a6d5b5ca2 --- /dev/null +++ b/e2e/templates/workload/storageclass_nfs_options.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: longhorn-test-nfs-options +provisioner: driver.longhorn.io +allowVolumeExpansion: true +parameters: + numberOfReplicas: '2' + staleReplicaTimeout: '30' + nfsOptions: "vers=4.2,noresvport,timeo=450,retrans=8" +reclaimPolicy: Delete diff --git a/e2e/tests/cluster_restart.robot b/e2e/tests/cluster_restart.robot index 06c160a093..2f917a6bdc 100644 --- a/e2e/tests/cluster_restart.robot +++ b/e2e/tests/cluster_restart.robot @@ -18,24 +18,30 @@ Restart Cluster While Workload Heavy Writing Given Create deployment 0 with rwo volume And Create deployment 1 with rwx volume And Create deployment 2 with rwo and strict-local volume + And Create deployment 3 with rwx and nfs-options volume And Create statefulset 0 with rwo volume And Create statefulset 1 with rwx volume And Create statefulset 2 with rwo and strict-local volume + And Create statefulset 3 with rwx and nfs-options volume FOR ${i} IN RANGE ${LOOP_COUNT} And Keep writing data to deployment 0 And Keep writing data to deployment 1 And Keep writing data to deployment 2 + And Keep writing data to deployment 3 And Keep writing data to statefulset 0 And Keep writing data to statefulset 1 And Keep writing data to statefulset 2 + And Keep writing data to statefulset 3 When Restart cluster Then Check deployment 0 works And Check deployment 1 works And Check deployment 2 works + And Check deployment 3 works And Check statefulset 0 works And Check statefulset 1 works And Check statefulset 2 works + And Check statefulset 3 works END