Merge pull request #120151 from Penguin-zlh/cleanup-e2e-framework-havekey

cleanup: e2e : stop using deprecated framework.ExpectHaveKey
This commit is contained in:
Kubernetes Prow Robot 2023-08-25 06:02:52 -07:00 committed by GitHub
commit 8b132ea40a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,7 +177,7 @@ var _ = SIGDescribe("DisruptionController", func() {
}, cs.PolicyV1().PodDisruptionBudgets(ns).UpdateStatus)
// fetch again to make sure the update from API was effective
updated := getPDBStatusOrDie(ctx, dc, ns, defaultName)
framework.ExpectHaveKey(updated.Status.DisruptedPods, pod.Name, "Expecting the DisruptedPods have %s", pod.Name)
gomega.Expect(updated.Status.DisruptedPods).To(gomega.HaveKey(pod.Name), "Expecting the DisruptedPods have %s", pod.Name)
ginkgo.By("Patching PodDisruptionBudget status")
patched := patchPDBOrDie(ctx, cs, dc, ns, defaultName, func(old *policyv1.PodDisruptionBudget) (bytes []byte, err error) {