e2e: move yaml filepath declaration to global

declared yaml filepath in gobal for reusing.

Co-authored-by: Madhu Rajanna <madhupr007@gmail.com>
Signed-off-by: Yug <yuggupta27@gmail.com>
This commit is contained in:
Yug 2021-03-22 12:27:02 +05:30 committed by mergify[bot]
parent 30092ff4e1
commit 91662b54b6

View File

@ -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 {