Skip to content

Commit

Permalink
Adjust reconcile tests to new mutation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhaja committed Oct 4, 2024
1 parent eedc548 commit 9060661
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions controllers/reconcile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,8 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) {
// confirm the strategy has been changed
assert.Equal(t, d.Spec.Strategy.RollingUpdate.MaxUnavailable.IntVal, int32(1))
assert.Equal(t, d.Spec.Strategy.RollingUpdate.MaxSurge.IntVal, int32(1))
// confirm that we don't remove annotations and labels even if we don't set them
// confirm that we don't remove annotations from metadata even if we don't set them
assert.Contains(t, d.Annotations, annotationName)
assert.Contains(t, d.Labels, labelName)
actual := v1.Service{}
exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(naming.Service(params.Name), params.Namespace))
assert.NoError(t, err)
Expand Down Expand Up @@ -757,9 +756,6 @@ func TestOpAMPBridgeReconciler_Reconcile(t *testing.T) {
exists, err := populateObjectIfExists(t, &d, namespacedObjectName(naming.OpAMPBridge(params.Name), params.Namespace))
assert.NoError(t, err)
assert.True(t, exists)
// confirm that we don't remove annotations and labels even if we don't set them
assert.Contains(t, d.Spec.Template.Annotations, annotationName)
assert.Contains(t, d.Labels, labelName)
actual := v1.Service{}
exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(naming.OpAMPBridgeService(params.Name), params.Namespace))
assert.NoError(t, err)
Expand Down

0 comments on commit 9060661

Please sign in to comment.