From 04321bc2e156b024132b2234543742ef4a84e1ec Mon Sep 17 00:00:00 2001 From: Tom Pantelis Date: Wed, 15 Nov 2023 22:32:28 -0500 Subject: [PATCH] AwaitResource should return generic type T Signed-off-by: Tom Pantelis --- pkg/test/assert.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/test/assert.go b/pkg/test/assert.go index af9fcb4e..2be103f1 100644 --- a/pkg/test/assert.go +++ b/pkg/test/assert.go @@ -104,8 +104,8 @@ func AwaitStatusCondition(expCond *metav1.Condition, get func() ([]metav1.Condit Expect(found.LastTransitionTime).To(Not(BeNil())) } -func AwaitResource[T runtime.Object](client resource.Interface[T], name string) runtime.Object { - var obj runtime.Object +func AwaitResource[T runtime.Object](client resource.Interface[T], name string) T { + var obj T Eventually(func() error { var err error