@@ -196,8 +196,9 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) {
196
196
// confirm the strategy has been changed
197
197
assert .Equal (t , d .Spec .Strategy .RollingUpdate .MaxUnavailable .IntVal , int32 (1 ))
198
198
assert .Equal (t , d .Spec .Strategy .RollingUpdate .MaxSurge .IntVal , int32 (1 ))
199
- // confirm that we don't remove annotations from metadata even if we don't set them
199
+ // confirm that we don't remove annotations and labels even if we don't set them
200
200
assert .Contains (t , d .Annotations , annotationName )
201
+ assert .Contains (t , d .Labels , labelName )
201
202
actual := v1.Service {}
202
203
exists , err = populateObjectIfExists (t , & actual , namespacedObjectName (naming .Service (params .Name ), params .Namespace ))
203
204
assert .NoError (t , err )
@@ -756,6 +757,9 @@ func TestOpAMPBridgeReconciler_Reconcile(t *testing.T) {
756
757
exists , err := populateObjectIfExists (t , & d , namespacedObjectName (naming .OpAMPBridge (params .Name ), params .Namespace ))
757
758
assert .NoError (t , err )
758
759
assert .True (t , exists )
760
+ // confirm that we don't remove annotations and labels even if we don't set them
761
+ assert .Contains (t , d .Spec .Template .Annotations , annotationName )
762
+ assert .Contains (t , d .Labels , labelName )
759
763
actual := v1.Service {}
760
764
exists , err = populateObjectIfExists (t , & actual , namespacedObjectName (naming .OpAMPBridgeService (params .Name ), params .Namespace ))
761
765
assert .NoError (t , err )
0 commit comments