mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
e2e: validate the error return instead of object for consitency
If loadPVC() fails, it return error and we expect the PVC object to be nil too. In many places we check on the error and exit. However in few places we are looking at PVC object. This commit make the condition check on `err` instead of `PVC` object for consistency. Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
dc4da25a30
commit
b4452f0787
@ -160,7 +160,7 @@ var _ = Describe("RBD Upgrade Testing", func() {
|
||||
data := "check data persists"
|
||||
|
||||
pvc, err = loadPVC(pvcPath)
|
||||
if pvc == nil {
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to load pvc with error %v", err)
|
||||
}
|
||||
pvc.Namespace = f.UniqueName
|
||||
|
Reference in New Issue
Block a user