mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-21 01:26:28 +00:00
Merge pull request #117416 from skitt/beequal
Document gomega.Equal() instead of gomega.BeEqual()
This commit is contained in:
commit
84f5684c2d
@ -81,7 +81,7 @@ var _ types.GomegaMatcher = &matcher[string]{}
|
|||||||
// assertions. The difference is that failed assertions are returned as an
|
// assertions. The difference is that failed assertions are returned as an
|
||||||
// error:
|
// error:
|
||||||
//
|
//
|
||||||
// if err := Gomega().Expect(pod.Status.Phase).To(gomega.BeEqual(v1.Running)); err != nil {
|
// if err := Gomega().Expect(pod.Status.Phase).To(gomega.Equal(v1.Running)); err != nil {
|
||||||
// return fmt.Errorf("test pod not running: %w", err)
|
// return fmt.Errorf("test pod not running: %w", err)
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
@ -294,14 +294,14 @@ var ErrFailure error = FailureError{}
|
|||||||
|
|
||||||
// ExpectEqual expects the specified two are the same, otherwise an exception raises
|
// ExpectEqual expects the specified two are the same, otherwise an exception raises
|
||||||
//
|
//
|
||||||
// Deprecated: use gomega.Expect().To(gomega.BeEqual())
|
// Deprecated: use gomega.Expect().To(gomega.Equal())
|
||||||
func ExpectEqual(actual interface{}, extra interface{}, explain ...interface{}) {
|
func ExpectEqual(actual interface{}, extra interface{}, explain ...interface{}) {
|
||||||
gomega.ExpectWithOffset(1, actual).To(gomega.Equal(extra), explain...)
|
gomega.ExpectWithOffset(1, actual).To(gomega.Equal(extra), explain...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExpectNotEqual expects the specified two are not the same, otherwise an exception raises
|
// ExpectNotEqual expects the specified two are not the same, otherwise an exception raises
|
||||||
//
|
//
|
||||||
// Deprecated: use gomega.Expect().ToNot(gomega.BeEqual())
|
// Deprecated: use gomega.Expect().ToNot(gomega.Equal())
|
||||||
func ExpectNotEqual(actual interface{}, extra interface{}, explain ...interface{}) {
|
func ExpectNotEqual(actual interface{}, extra interface{}, explain ...interface{}) {
|
||||||
gomega.ExpectWithOffset(1, actual).NotTo(gomega.Equal(extra), explain...)
|
gomega.ExpectWithOffset(1, actual).NotTo(gomega.Equal(extra), explain...)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user