Skip to content

Commit

Permalink
Fixed sriov conformance release vf test case
Browse files Browse the repository at this point in the history
Fixed expected log for release the VFs test case
  • Loading branch information
kononovn committed Jun 2, 2022
1 parent 23d3a97 commit 1bf583c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/conformance/tests/sriov_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -874,18 +874,17 @@ var _ = Describe("[sriov] operator", func() {
}, 3*time.Minute, time.Second).Should(Equal(corev1.PodPending))

By("Checking that relevant error event was originated")
Eventually(func() string {
Eventually(func() bool {
events, err := clients.Events(namespaces.Test).List(context.Background(), metav1.ListOptions{})
Expect(err).ToNot(HaveOccurred())

for _, val := range events.Items {
if val.InvolvedObject.Name == runningPodB.Name {
return val.Message
if val.InvolvedObject.Name == runningPodB.Name && strings.Contains(val.Message, fmt.Sprintf("Insufficient openshift.io/%s", resourceName)) {
return true
}
}
return ""
}, 2*time.Minute, 10*time.Second).Should(ContainSubstring("Insufficient openshift.io/%s", resourceName),
"Error to detect Required Event")
return false
}, 2*time.Minute, 10*time.Second).Should(BeTrue(), "Error to detect Required Event")
By("Delete first pod and release all VFs")
err = clients.Pods(namespaces.Test).Delete(context.Background(), runningPodA.Name, metav1.DeleteOptions{
GracePeriodSeconds: pointer.Int64Ptr(0),
Expand Down

0 comments on commit 1bf583c

Please sign in to comment.