From 4afc26155fee45e0db830fb0586ce6e9ec1a2766 Mon Sep 17 00:00:00 2001 From: adarsh-dell Date: Mon, 30 Sep 2024 07:55:44 -0400 Subject: [PATCH 1/2] E2E for CSI-Unity driver with minimal CR --- .../minimal-testfiles/scenarios.yaml | 23 +++++++++++++++++++ .../minimal-testfiles/storage_csm_unity.yaml | 12 ++++++++++ 2 files changed, 35 insertions(+) create mode 100644 tests/e2e/testfiles/minimal-testfiles/storage_csm_unity.yaml diff --git a/tests/e2e/testfiles/minimal-testfiles/scenarios.yaml b/tests/e2e/testfiles/minimal-testfiles/scenarios.yaml index ecac21a27..d7bfc616d 100644 --- a/tests/e2e/testfiles/minimal-testfiles/scenarios.yaml +++ b/tests/e2e/testfiles/minimal-testfiles/scenarios.yaml @@ -73,3 +73,26 @@ - "Delete custom resource [1]" - "Restore template [testfiles/powerstore-templates/powerstore-secret-template.yaml] for [pstore]" - "Restore template [testfiles/powerstore-templates/powerstore-storageclass-template.yaml] for [pstore]" + +- scenario: "Install Unity Driver(Standalone)" + paths: + - "testfiles/minimal-testfiles/storage_csm_unity.yaml" + tags: + - "unity" + steps: + - "Given an environment with k8s or openshift, and CSM operator installed" + - "Create storageclass with name [op-e2e-unity] and template [testfiles/unity-templates/unity-storageclass-template.yaml] for [unity]" + - "Set up secret with template [testfiles/unity-templates/unity-secret-template.yaml] name [unity-creds] in namespace [unity] for [unity]" + - "Apply custom resource [1]" + - "Validate custom resource [1]" + - "Validate [unity] driver from CR [1] is installed" + - "Run custom test" + # cleanup + - "Enable forceRemoveDriver on CR [1]" + - "Delete custom resource [1]" + - "Restore template [testfiles/unity-templates/unity-secret-template.yaml] for [unity]" + - "Restore template [testfiles/unity-templates/unity-storageclass-template.yaml] for [unity]" + customTest: + name: Cert CSI + run: + - cert-csi test vio --sc op-e2e-unity --chainNumber 2 --chainLength 2 \ No newline at end of file diff --git a/tests/e2e/testfiles/minimal-testfiles/storage_csm_unity.yaml b/tests/e2e/testfiles/minimal-testfiles/storage_csm_unity.yaml new file mode 100644 index 000000000..c0fa9f646 --- /dev/null +++ b/tests/e2e/testfiles/minimal-testfiles/storage_csm_unity.yaml @@ -0,0 +1,12 @@ +apiVersion: storage.dell.com/v1 +kind: ContainerStorageModule +metadata: + name: unity + namespace: unity +spec: + driver: + csiDriverType: "unity" + configVersion: v2.12.0 + common: + image: "dellemc/csi-unity:nightly" + forceRemoveDriver: true From 7401b2f26de13571492a83a82245f0665f8eebed Mon Sep 17 00:00:00 2001 From: adarsh-dell Date: Mon, 30 Sep 2024 08:05:36 -0400 Subject: [PATCH 2/2] Linter fixes --- tests/e2e/testfiles/minimal-testfiles/scenarios.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/testfiles/minimal-testfiles/scenarios.yaml b/tests/e2e/testfiles/minimal-testfiles/scenarios.yaml index d7bfc616d..1757001c9 100644 --- a/tests/e2e/testfiles/minimal-testfiles/scenarios.yaml +++ b/tests/e2e/testfiles/minimal-testfiles/scenarios.yaml @@ -95,4 +95,4 @@ customTest: name: Cert CSI run: - - cert-csi test vio --sc op-e2e-unity --chainNumber 2 --chainLength 2 \ No newline at end of file + - cert-csi test vio --sc op-e2e-unity --chainNumber 2 --chainLength 2