mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 18:54:06 +00:00
Merge pull request #123138 from carlory/remove-ExpectNotEqual
remove deprecated framework.ExpectNotEqual
This commit is contained in:
commit
a54d84d17f
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user