From c52b0e50499728851c17cc02f9e85e4428a9ddaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl?= Date: Fri, 10 Nov 2023 17:10:02 +0000 Subject: [PATCH] fix tests --- fleetshard/pkg/central/reconciler/reconciler_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fleetshard/pkg/central/reconciler/reconciler_test.go b/fleetshard/pkg/central/reconciler/reconciler_test.go index 2a8561b0c6..866ec6fac3 100644 --- a/fleetshard/pkg/central/reconciler/reconciler_test.go +++ b/fleetshard/pkg/central/reconciler/reconciler_test.go @@ -1069,11 +1069,15 @@ func TestTelemetryOptionsAreSetInCR(t *testing.T) { require.NoError(t, err) require.NotNil(t, central.Spec.Central.Telemetry.Enabled) - assert.Equal(t, tc.enabled, *central.Spec.Central.Telemetry.Enabled) + assert.True(t, *central.Spec.Central.Telemetry.Enabled) require.NotNil(t, central.Spec.Central.Telemetry.Storage.Endpoint) assert.Equal(t, tc.telemetry.StorageEndpoint, *central.Spec.Central.Telemetry.Storage.Endpoint) require.NotNil(t, central.Spec.Central.Telemetry.Storage.Key) - assert.Equal(t, tc.telemetry.StorageKey, *central.Spec.Central.Telemetry.Storage.Key) + if tc.telemetry.StorageKey == "" { + assert.Equal(t, "DISABLED", *central.Spec.Central.Telemetry.Storage.Key) + } else { + assert.Equal(t, tc.telemetry.StorageKey, *central.Spec.Central.Telemetry.Storage.Key) + } }) } }