mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
e2e: only call error check functions when err != nil
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
075a4087d7
commit
f7ae33c67c
12
e2e/pvc.go
12
e2e/pvc.go
@ -61,14 +61,14 @@ func createPVCAndvalidatePV(c kubernetes.Interface, pvc *v1.PersistentVolumeClai
|
|||||||
|
|
||||||
pv, err = c.CoreV1().PersistentVolumes().Get(context.TODO(), pvc.Spec.VolumeName, metav1.GetOptions{})
|
pv, err = c.CoreV1().PersistentVolumes().Get(context.TODO(), pvc.Spec.VolumeName, metav1.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if isRetryableAPIError(err) {
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
|
if apierrs.IsNotFound(err) {
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
return false, fmt.Errorf("failed to get pv: %w", err)
|
return false, fmt.Errorf("failed to get pv: %w", err)
|
||||||
}
|
}
|
||||||
if isRetryableAPIError(err) {
|
|
||||||
return false, nil
|
|
||||||
}
|
|
||||||
if apierrs.IsNotFound(err) {
|
|
||||||
return false, nil
|
|
||||||
}
|
|
||||||
err = e2epv.WaitOnPVandPVC(
|
err = e2epv.WaitOnPVandPVC(
|
||||||
c,
|
c,
|
||||||
&framework.TimeoutContext{ClaimBound: timeout, PVBound: timeout},
|
&framework.TimeoutContext{ClaimBound: timeout, PVBound: timeout},
|
||||||
|
Loading…
Reference in New Issue
Block a user