Skip to content

Commit

Permalink
AwaitResource should return generic type T
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
  • Loading branch information
tpantelis authored and skitt committed Nov 16, 2023
1 parent 8fbc088 commit 04321bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/test/assert.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04321bc

Please sign in to comment.