Skip to content

Commit

Permalink
fix: unit tests
Browse files Browse the repository at this point in the history
there was change in behaviour of kubernetes-sigs/controller-runtime -
kubernetes-sigs/controller-runtime#2633.
This commit updates test to copy TypeMeta in update CreateOrUpdate
function.
Signed-off-by: Karel Simon <ksimon@redhat.com>
  • Loading branch information
ksimon1 committed Jan 19, 2024
1 parent 39a74f6 commit b964568
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/common/resource_test.go
Expand Up @@ -296,6 +296,7 @@ func createOrUpdateTestResource(request *Request) (ReconcileResult, error) {
return CreateOrUpdate(request).
NamespacedResource(newTestResource(namespace)).
UpdateFunc(func(expected, found client.Object) {
found.(*v1.Service).TypeMeta = expected.(*v1.Service).TypeMeta
found.(*v1.Service).Spec = expected.(*v1.Service).Spec
}).
Reconcile()
Expand Down

0 comments on commit b964568

Please sign in to comment.