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 24, 2024
1 parent e55cdee commit f8a7389
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions go.sum
Expand Up @@ -771,6 +771,7 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 h1:nz5NESFLZbJGPFxDT/HCn+V1mZ8JGNoY4nUpmW/Y2eg=
google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917/go.mod h1:pZqR+glSb11aJ+JQcczCvgf47+duRuzNSKqE8YAQnV0=
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM=
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac h1:nUQEQmH/csSvFECKYRv6HWEyypysidKl2I6Qpsglq/0=
Expand Down
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 f8a7389

Please sign in to comment.