Skip to content

Commit 142eb5c

Browse files
committed
Revert "Adjust reconcile tests to new mutation logic"
This reverts commit 9060661.
1 parent 764f054 commit 142eb5c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

controllers/reconcile_test.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,9 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) {
196196
// confirm the strategy has been changed
197197
assert.Equal(t, d.Spec.Strategy.RollingUpdate.MaxUnavailable.IntVal, int32(1))
198198
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
200200
assert.Contains(t, d.Annotations, annotationName)
201+
assert.Contains(t, d.Labels, labelName)
201202
actual := v1.Service{}
202203
exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(naming.Service(params.Name), params.Namespace))
203204
assert.NoError(t, err)
@@ -756,6 +757,9 @@ func TestOpAMPBridgeReconciler_Reconcile(t *testing.T) {
756757
exists, err := populateObjectIfExists(t, &d, namespacedObjectName(naming.OpAMPBridge(params.Name), params.Namespace))
757758
assert.NoError(t, err)
758759
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)
759763
actual := v1.Service{}
760764
exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(naming.OpAMPBridgeService(params.Name), params.Namespace))
761765
assert.NoError(t, err)

0 commit comments

Comments
 (0)