From 5b1e1920980d74dc145997c97960003c5492b408 Mon Sep 17 00:00:00 2001 From: Jim Ryan Date: Mon, 23 Sep 2024 17:06:04 +0100 Subject: [PATCH] remove unnessary type assertion --- internal/certmanager/test_files/reactors.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/internal/certmanager/test_files/reactors.go b/internal/certmanager/test_files/reactors.go index 8dcdcfb81e..63aad0a006 100644 --- a/internal/certmanager/test_files/reactors.go +++ b/internal/certmanager/test_files/reactors.go @@ -46,11 +46,7 @@ func ObjectCreatedReactor(t *testing.T, b *Builder, expectedObj runtime.Object) if !ok { return } - obj, ok := createAction.GetObject().(runtime.Object) - if !ok { - t.Errorf("object passed to Create does not implement runtime.Object") - } - + obj := createAction.GetObject() if !reflect.DeepEqual(obj, expectedObj) { t.Errorf("expected %+v to equal %+v", obj, expectedObj) }