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

feat(rwx): add rwx nfsOptions to robot test scaffolding. #1690

Closed
Closed
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions e2e/libs/keywords/workload_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions e2e/libs/workload/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested based on #1805.

storageclass-nfs-options.yaml should be storageclass_nfs_options.yaml.
Others LGTM.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make that change, thanks!. Hopefully I can run this myself from Jenkins?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can run customized e2e tests by building images by yourself now, but since e2e test has been refactored by #1604, it is possible that you need to make extra changes to make things work.

else:
filepath = "./templates/workload/storageclass.yaml"

Expand Down
12 changes: 12 additions & 0 deletions e2e/templates/workload/storageclass_nfs_options.yaml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions e2e/tests/cluster_restart.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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