mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
Add E2E for block PVC resize
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
374e47046f
commit
ad7e5ca301
23
e2e/rbd.go
23
e2e/rbd.go
@ -250,7 +250,7 @@ var _ = Describe("RBD", func() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
By("Resize PVC and check application directory size", func() {
|
By("Resize Filesystem PVC and check application directory size", func() {
|
||||||
v, err := f.ClientSet.Discovery().ServerVersion()
|
v, err := f.ClientSet.Discovery().ServerVersion()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Logf("failed to get server version with error %v", err)
|
e2elog.Logf("failed to get server version with error %v", err)
|
||||||
@ -261,7 +261,7 @@ var _ = Describe("RBD", func() {
|
|||||||
if v.Major > "1" || (v.Major == "1" && v.Minor >= "15") {
|
if v.Major > "1" || (v.Major == "1" && v.Minor >= "15") {
|
||||||
err := resizePVCAndValidateSize(pvcPath, appPath, f)
|
err := resizePVCAndValidateSize(pvcPath, appPath, f)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Logf("failed to resize PVC %v", err)
|
e2elog.Logf("failed to resize filesystem PVC %v", err)
|
||||||
Fail(err.Error())
|
Fail(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,13 +269,30 @@ var _ = Describe("RBD", func() {
|
|||||||
createRBDStorageClass(f.ClientSet, f, map[string]string{"csi.storage.k8s.io/fstype": "xfs"})
|
createRBDStorageClass(f.ClientSet, f, map[string]string{"csi.storage.k8s.io/fstype": "xfs"})
|
||||||
err = resizePVCAndValidateSize(pvcPath, appPath, f)
|
err = resizePVCAndValidateSize(pvcPath, appPath, f)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Logf("failed to resize PVC %v", err)
|
e2elog.Logf("failed to resize filesystem PVC %v", err)
|
||||||
Fail(err.Error())
|
Fail(err.Error())
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
By("Resize Block PVC and check Device size", func() {
|
||||||
|
v, err := f.ClientSet.Discovery().ServerVersion()
|
||||||
|
if err != nil {
|
||||||
|
e2elog.Logf("failed to get server version with error %v", err)
|
||||||
|
Fail(err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
|
// Block PVC resize is supported in kubernetes 1.16+
|
||||||
|
if v.Major > "1" || (v.Major == "1" && v.Minor >= "16") {
|
||||||
|
err := resizePVCAndValidateSize(rawPvcPath, rawAppPath, f)
|
||||||
|
if err != nil {
|
||||||
|
e2elog.Logf("failed to resize block PVC %v", err)
|
||||||
|
Fail(err.Error())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
By("Test unmount after nodeplugin restart", func() {
|
By("Test unmount after nodeplugin restart", func() {
|
||||||
pvc, err := loadPVC(pvcPath)
|
pvc, err := loadPVC(pvcPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user