Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions tests/e2e/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -2773,9 +2773,11 @@ func verifyIsAttachedInSupervisor(ctx context.Context, f *framework.Framework,
gomega.Expect(instance).NotTo(gomega.BeNil())
for _, vol := range instance.Status.VolumeStatus {
if vol.Name == volumeHandle {
// Access the Attached field within the PVC status
volumeAttachmentStatus = vol.PersistentVolumeClaim.Attached
break
for _, cond := range vol.PersistentVolumeClaim.Conditions {
// Access the Status field within the PVC's Conditions
volumeAttachmentStatus = (cond.Status == metav1.ConditionTrue)
break
}
}
}
framework.Logf("instance attached found to be : %t\n", volumeAttachmentStatus)
Expand All @@ -2802,9 +2804,11 @@ func verifyIsDetachedInSupervisor(ctx context.Context, f *framework.Framework,
gomega.Expect(instance).NotTo(gomega.BeNil())
for _, vol := range instance.Status.VolumeStatus {
if vol.Name == volumeHandle {
// Access the Attached field within the PVC status
volumeAttachmentStatus = vol.PersistentVolumeClaim.Attached
break
for _, cond := range vol.PersistentVolumeClaim.Conditions {
// Access the Status field within the PVC's Conditions
volumeAttachmentStatus = (cond.Status == metav1.ConditionTrue)
break
}
}
}
framework.Logf("instance attached found to be : %t\n", volumeAttachmentStatus)
Expand Down