Local PV Stress test: don't fail on deleting missing PV

This commit is contained in:
Tomas Smetana 2023-08-03 12:51:31 +02:00
parent 99190634ab
commit 24f32d9d18

View File

@ -529,7 +529,7 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
continue
}
err = config.client.CoreV1().PersistentVolumes().Delete(backgroundCtx, pv.Name, metav1.DeleteOptions{})
if errors.Is(err, context.Canceled) {
if apierrors.IsNotFound(err) || errors.Is(err, context.Canceled) {
continue
}
framework.ExpectNoError(err)