Merge pull request #123138 from carlory/remove-ExpectNotEqual

remove deprecated framework.ExpectNotEqual
This commit is contained in:
Kubernetes Prow Robot 2024-02-23 02:57:09 -08:00 committed by GitHub
commit a54d84d17f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 10 deletions

View File

@ -293,13 +293,6 @@ func (f *FailureError) backtrace() {
// }
var ErrFailure error = FailureError{}
// ExpectNotEqual expects the specified two are not the same, otherwise an exception raises
//
// Deprecated: use gomega.Expect().ToNot(gomega.Equal())
func ExpectNotEqual(actual interface{}, extra interface{}, explain ...interface{}) {
gomega.ExpectWithOffset(1, actual).NotTo(gomega.Equal(extra), explain...)
}
// ExpectError expects an error happens, otherwise an exception raises
//
// Deprecated: use gomega.Expect().To(gomega.HaveOccurred()) or (better!) check

View File

@ -1077,7 +1077,7 @@ var _ = common.SIGDescribe("Services", func() {
pausePods, err := cs.CoreV1().Pods(ns).List(ctx, metav1.ListOptions{LabelSelector: labelSelector.String()})
framework.ExpectNoError(err, "Error in listing pods associated with pause pod deployments")
framework.ExpectNotEqual(pausePods.Items[0].Spec.NodeName, pausePods.Items[1].Spec.NodeName)
gomega.Expect(pausePods.Items[0].Spec.NodeName).NotTo(gomega.Equal(pausePods.Items[1].Spec.NodeName))
serviceAddress := net.JoinHostPort(serviceIP, strconv.Itoa(servicePort))
@ -3917,7 +3917,7 @@ func execAffinityTestForSessionAffinityTimeout(ctx context.Context, f *framework
family = v1.IPv6Protocol
}
svcIP = e2enode.FirstAddressByTypeAndFamily(nodes, v1.NodeInternalIP, family)
framework.ExpectNotEqual(svcIP, "", "failed to get Node internal IP for family: %s", family)
gomega.Expect(svcIP).NotTo(gomega.BeEmpty(), "failed to get Node internal IP for family: %s", family)
servicePort = int(svc.Spec.Ports[0].NodePort)
} else {
svcIP = svc.Spec.ClusterIP
@ -4000,7 +4000,7 @@ func execAffinityTestForNonLBServiceWithOptionalTransition(ctx context.Context,
family = v1.IPv6Protocol
}
svcIP = e2enode.FirstAddressByTypeAndFamily(nodes, v1.NodeInternalIP, family)
framework.ExpectNotEqual(svcIP, "", "failed to get Node internal IP for family: %s", family)
gomega.Expect(svcIP).NotTo(gomega.BeEmpty(), "failed to get Node internal IP for family: %s", family)
servicePort = int(svc.Spec.Ports[0].NodePort)
} else {
svcIP = svc.Spec.ClusterIP