From 0a8343352b4acf09e8ec5322354fce672306ef17 Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Mon, 17 Apr 2023 22:47:38 +0200 Subject: [PATCH] Document gomega.Equal() instead of gomega.BeEqual() BeEqual() doesn't exist, document Equal() instead (as used in the actual code). Signed-off-by: Stephen Kitt --- test/e2e/framework/expect.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/framework/expect.go b/test/e2e/framework/expect.go index 7908cdcf377..5ad38f86415 100644 --- a/test/e2e/framework/expect.go +++ b/test/e2e/framework/expect.go @@ -81,7 +81,7 @@ var _ types.GomegaMatcher = &matcher[string]{} // assertions. The difference is that failed assertions are returned as an // 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) // } // @@ -294,14 +294,14 @@ var ErrFailure error = FailureError{} // 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{}) { gomega.ExpectWithOffset(1, actual).To(gomega.Equal(extra), explain...) } // 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{}) { gomega.ExpectWithOffset(1, actual).NotTo(gomega.Equal(extra), explain...) }