Skip to content

Commit f8a7389

Browse files
committed
fix: unit tests
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 <[email protected]>
1 parent e55cdee commit f8a7389

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

go.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,7 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D
771771
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
772772
google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
773773
google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 h1:nz5NESFLZbJGPFxDT/HCn+V1mZ8JGNoY4nUpmW/Y2eg=
774+
google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917/go.mod h1:pZqR+glSb11aJ+JQcczCvgf47+duRuzNSKqE8YAQnV0=
774775
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM=
775776
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0=
776777
google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac h1:nUQEQmH/csSvFECKYRv6HWEyypysidKl2I6Qpsglq/0=

internal/common/resource_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ func createOrUpdateTestResource(request *Request) (ReconcileResult, error) {
296296
return CreateOrUpdate(request).
297297
NamespacedResource(newTestResource(namespace)).
298298
UpdateFunc(func(expected, found client.Object) {
299+
found.(*v1.Service).TypeMeta = expected.(*v1.Service).TypeMeta
299300
found.(*v1.Service).Spec = expected.(*v1.Service).Spec
300301
}).
301302
Reconcile()

0 commit comments

Comments
 (0)