Skip to content

Commit 279f02c

Browse files
committed
Check for config processing errors in coordinator unit tests (#10203)
(cherry picked from commit 0ba2ea6)
1 parent 47bdaf1 commit 279f02c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/pkg/agent/application/coordinator/coordinator_unit_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,7 @@ service:
941941
configChan <- cfgChange
942942
coord.runLoopIteration(ctx)
943943
assert.True(t, cfgChange.acked, "empty policy should be acknowledged")
944+
assert.NoError(t, cfgChange.err, "config processing shouldn't report an error")
944945
assert.True(t, updated, "empty policy should cause runtime manager update")
945946
assert.Empty(t, components, "empty policy should produce empty component model")
946947
assert.True(t, otelUpdated, "empty policy should cause otel manager update")
@@ -1057,6 +1058,7 @@ service:
10571058
configChan <- cfgChange
10581059
coord.runLoopIteration(ctx)
10591060
assert.True(t, cfgChange.acked, "Coordinator should ACK a successful policy change")
1061+
assert.NoError(t, cfgChange.err, "config processing shouldn't report an error")
10601062

10611063
// Make sure the runtime manager received the expected component update.
10621064
// An assert.Equal on the full component model doesn't play nice with
@@ -1121,6 +1123,7 @@ service:
11211123
configChan <- cfgChange
11221124
coord.runLoopIteration(ctx)
11231125
assert.True(t, cfgChange.acked, "Coordinator should ACK a successful policy change")
1126+
assert.NoError(t, cfgChange.err, "config processing shouldn't report an error")
11241127

11251128
// Make sure the runtime manager received the expected component update.
11261129
// An assert.Equal on the full component model doesn't play nice with

0 commit comments

Comments
 (0)