Skip to content

Commit

Permalink
test(ci): adding volgroup test
Browse files Browse the repository at this point in the history
Signed-off-by: Abhilash Shetty <[email protected]>
  • Loading branch information
abhilashshetty04 committed Jun 28, 2024
1 parent 5a5306b commit 651d3f1
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions tests/provision_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ func deleteAppAndPvc(appnames []string, pvcname string) {
deleteAndVerifyPVC(pvcName)
}

func setupVg(size int) string {
func setupVg(size int, name string) string {
device := createPV(size)
createVg("lvmvg", device)
createVg(name, device)
return device
}

func cleanupVg(device string) {
removeVg("lvmvg")
func cleanupVg(device string, name string) {
removeVg(name)
removePV(device)
}

Expand Down Expand Up @@ -110,7 +110,8 @@ func blockVolCreationTest() {
}

func vgExtendTest() {
device := setupVg(3)
device_0 := setupVg(7, "lvmvgdiff")
device := setupVg(3, "lvmvg")
By("Creating default storage class", createStorageClass)
By("creating and verifying PVC bound status")
createAndVerifyBlockPVC(false)
Expand All @@ -127,12 +128,13 @@ func vgExtendTest() {
By("Verifying that PV exists after PVC deletion")
verifyPVForPVC(false, pvcName)
By("Deleting storage class", deleteStorageClass)
cleanupVg(device)
cleanupVg(device_0, "lvmvgdiff")
cleanupVg(device, "lvmvg")
removePV(device_1)
}

func vgNotPresentTest() {
device := setupVg(40)
device := setupVg(40, "lvmvg")
By("Creating custom storage class with non existing vg parameter", createStorageClassWithNonExistingVg)
By("creating and verifying PVC Not Bound status")
createAndVerifyPVC(false)
Expand All @@ -141,7 +143,7 @@ func vgNotPresentTest() {
By("Deleting pvc")
deleteAndVerifyPVC(pvcName)
By("Deleting storage class", deleteStorageClass)
cleanupVg(device)
cleanupVg(device, "lvmvg")
}

func sharedVolumeTest() {
Expand Down Expand Up @@ -252,13 +254,13 @@ func leakProtectionTest() {
}

func volumeCreationTest() {
device := setupVg(40)
/*device := setupVg(40, "lvmvg")
By("Running filesystem volume creation test", fsVolCreationTest)
By("Running block volume creation test", blockVolCreationTest)
By("Running thin volume creation test", thinVolCreationTest)
By("Running leak protection test", leakProtectionTest)
By("Running shared volume for two app pods on same node test", sharedVolumeTest)
cleanupVg(device)
cleanupVg(device, "lvmvg")*/
}

func schedulingTest() {
Expand All @@ -267,8 +269,8 @@ func schedulingTest() {
}

func capacityTest() {
device := setupVg(40)
/*device := setupVg(40, "lvmvg")
By("Running thin volume capacity test", thinVolCapacityTest)
By("Running sized snapshot test", sizedSnapshotTest)
cleanupVg(device)
cleanupVg(device, "lvmvg")*/
}

0 comments on commit 651d3f1

Please sign in to comment.