From 5be5dc9d54aa717a401d1d9e76064ae027fc7bb9 Mon Sep 17 00:00:00 2001 From: Hemant Kumar Date: Tue, 7 Oct 2025 10:30:06 -0400 Subject: [PATCH] With new changes we will also have a VolumeModifying condition Fix e2e tests to take that into account --- test/e2e/framework/pv/wait.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/e2e/framework/pv/wait.go b/test/e2e/framework/pv/wait.go index ebfe227afe3..aa94b17081b 100644 --- a/test/e2e/framework/pv/wait.go +++ b/test/e2e/framework/pv/wait.go @@ -76,11 +76,16 @@ func WaitForPersistentVolumeClaimModificationFailure(ctx context.Context, c clie desiredClass := ptr.Deref(claim.Spec.VolumeAttributesClassName, "") var match = func(claim *v1.PersistentVolumeClaim) bool { + foundErrorCondition := false for _, condition := range claim.Status.Conditions { - if condition.Type != v1.PersistentVolumeClaimVolumeModifyVolumeError { - return false + if condition.Type == v1.PersistentVolumeClaimVolumeModifyVolumeError { + foundErrorCondition = true } } + // if no error found it must be an error + if !foundErrorCondition { + return false + } // check if claim's current volume attributes class is NOT desired one, and has appropriate ModifyVolumeStatus currentClass := ptr.Deref(claim.Status.CurrentVolumeAttributesClassName, "")