Merge pull request #119494 from carlory/cleanup-e2e-network-framework-equal

e2e_network: stop using deprecated framework.ExpectEqual
This commit is contained in:
Kubernetes Prow Robot
2023-08-18 03:06:28 -07:00
committed by GitHub
12 changed files with 91 additions and 70 deletions

View File

@@ -550,7 +550,7 @@ var _ = common.SIGDescribe("LoadBalancers", func() {
// Make sure acceptPod is running. There are certain chances that pod might be terminated due to unexpected reasons.
acceptPod, err = cs.CoreV1().Pods(namespace).Get(ctx, acceptPod.Name, metav1.GetOptions{})
framework.ExpectNoError(err, "Unable to get pod %s", acceptPod.Name)
framework.ExpectEqual(acceptPod.Status.Phase, v1.PodRunning)
gomega.Expect(acceptPod.Status.Phase).To(gomega.Equal(v1.PodRunning))
framework.ExpectNotEqual(acceptPod.Status.PodIP, "")
// Create loadbalancer service with source range from node[0] and podAccept
@@ -580,7 +580,7 @@ var _ = common.SIGDescribe("LoadBalancers", func() {
// Make sure dropPod is running. There are certain chances that the pod might be terminated due to unexpected reasons.
dropPod, err = cs.CoreV1().Pods(namespace).Get(ctx, dropPod.Name, metav1.GetOptions{})
framework.ExpectNoError(err, "Unable to get pod %s", dropPod.Name)
framework.ExpectEqual(acceptPod.Status.Phase, v1.PodRunning)
gomega.Expect(acceptPod.Status.Phase).To(gomega.Equal(v1.PodRunning))
framework.ExpectNotEqual(acceptPod.Status.PodIP, "")
ginkgo.By("Update service LoadBalancerSourceRange and check reachability")
@@ -735,7 +735,7 @@ var _ = common.SIGDescribe("LoadBalancers", func() {
framework.Failf("Loadbalancer IP not changed to internal.")
}
// should have the given static internal IP.
framework.ExpectEqual(e2eservice.GetIngressPoint(lbIngress), internalStaticIP)
gomega.Expect(e2eservice.GetIngressPoint(lbIngress)).To(gomega.Equal(internalStaticIP))
}
})
@@ -782,7 +782,7 @@ var _ = common.SIGDescribe("LoadBalancers", func() {
if err != nil {
framework.Failf("gceCloud.GetHttpHealthCheck(%q) = _, %v; want nil", hcName, err)
}
framework.ExpectEqual(hc.CheckIntervalSec, gceHcCheckIntervalSeconds)
gomega.Expect(hc.CheckIntervalSec).To(gomega.Equal(gceHcCheckIntervalSeconds))
ginkgo.By("modify the health check interval")
hc.CheckIntervalSec = gceHcCheckIntervalSeconds - 1