From 91662b54b6acfd3db56b4f62e2b1c58d7b8e57a7 Mon Sep 17 00:00:00 2001 From: Yug Date: Mon, 22 Mar 2021 12:27:02 +0530 Subject: [PATCH] e2e: move yaml filepath declaration to global declared yaml filepath in gobal for reusing. Co-authored-by: Madhu Rajanna Signed-off-by: Yug --- e2e/rbd.go | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/e2e/rbd.go b/e2e/rbd.go index 29a75ba82..18cb52e0f 100644 --- a/e2e/rbd.go +++ b/e2e/rbd.go @@ -39,6 +39,20 @@ var ( nodeCSIZoneLabel = "topology.rbd.csi.ceph.com/zone" rbdTopologyPool = "newrbdpool" rbdTopologyDataPool = "replicapool" // NOTE: should be different than rbdTopologyPool for test to be effective + + // yaml files required for deployment + pvcPath = rbdExamplePath + "pvc.yaml" + appPath = rbdExamplePath + "pod.yaml" + rawPvcPath = rbdExamplePath + "raw-block-pvc.yaml" + rawAppPath = rbdExamplePath + "raw-block-pod.yaml" + pvcClonePath = rbdExamplePath + "pvc-restore.yaml" + pvcSmartClonePath = rbdExamplePath + "pvc-clone.yaml" + pvcBlockSmartClonePath = rbdExamplePath + "pvc-block-clone.yaml" + appClonePath = rbdExamplePath + "pod-restore.yaml" + appSmartClonePath = rbdExamplePath + "pod-clone.yaml" + appBlockSmartClonePath = rbdExamplePath + "block-pod-clone.yaml" + snapshotPath = rbdExamplePath + "snapshot.yaml" + defaultCloneCount = 10 ) func deployRBDPlugin() { @@ -271,19 +285,6 @@ var _ = Describe("RBD", func() { Context("Test RBD CSI", func() { It("Test RBD CSI", func() { - pvcPath := rbdExamplePath + "pvc.yaml" - appPath := rbdExamplePath + "pod.yaml" - rawPvcPath := rbdExamplePath + "raw-block-pvc.yaml" - rawAppPath := rbdExamplePath + "raw-block-pod.yaml" - pvcClonePath := rbdExamplePath + "pvc-restore.yaml" - pvcSmartClonePath := rbdExamplePath + "pvc-clone.yaml" - pvcBlockSmartClonePath := rbdExamplePath + "pvc-block-clone.yaml" - appClonePath := rbdExamplePath + "pod-restore.yaml" - appSmartClonePath := rbdExamplePath + "pod-clone.yaml" - appBlockSmartClonePath := rbdExamplePath + "block-pod-clone.yaml" - snapshotPath := rbdExamplePath + "snapshot.yaml" - defaultCloneCount := 10 - By("checking provisioner deployment is running", func() { err := waitForDeploymentComplete(rbdDeploymentName, cephCSINamespace, f.ClientSet, deployTimeout) if err != nil {