From 279f02cb8e26d45d0cc7a1667e86aea9f8c7d804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Tue, 30 Sep 2025 14:19:02 +0200 Subject: [PATCH] Check for config processing errors in coordinator unit tests (#10203) (cherry picked from commit 0ba2ea6838d595ec3108927d7f7d2d1a951ec1d1) --- .../pkg/agent/application/coordinator/coordinator_unit_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/pkg/agent/application/coordinator/coordinator_unit_test.go b/internal/pkg/agent/application/coordinator/coordinator_unit_test.go index 38ba154d113..aa57583c8aa 100644 --- a/internal/pkg/agent/application/coordinator/coordinator_unit_test.go +++ b/internal/pkg/agent/application/coordinator/coordinator_unit_test.go @@ -941,6 +941,7 @@ service: configChan <- cfgChange coord.runLoopIteration(ctx) assert.True(t, cfgChange.acked, "empty policy should be acknowledged") + assert.NoError(t, cfgChange.err, "config processing shouldn't report an error") assert.True(t, updated, "empty policy should cause runtime manager update") assert.Empty(t, components, "empty policy should produce empty component model") assert.True(t, otelUpdated, "empty policy should cause otel manager update") @@ -1057,6 +1058,7 @@ service: configChan <- cfgChange coord.runLoopIteration(ctx) assert.True(t, cfgChange.acked, "Coordinator should ACK a successful policy change") + assert.NoError(t, cfgChange.err, "config processing shouldn't report an error") // Make sure the runtime manager received the expected component update. // An assert.Equal on the full component model doesn't play nice with @@ -1121,6 +1123,7 @@ service: configChan <- cfgChange coord.runLoopIteration(ctx) assert.True(t, cfgChange.acked, "Coordinator should ACK a successful policy change") + assert.NoError(t, cfgChange.err, "config processing shouldn't report an error") // Make sure the runtime manager received the expected component update. // An assert.Equal on the full component model doesn't play nice with