Skip to content

Commit c13cd29

Browse files
committed
Check for config processing errors in coordinator unit tests
1 parent ae7ce8a commit c13cd29

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
@@ -954,6 +954,7 @@ service:
954954
configChan <- cfgChange
955955
coord.runLoopIteration(ctx)
956956
assert.True(t, cfgChange.acked, "empty policy should be acknowledged")
957+
assert.NoError(t, cfgChange.err, "config processing shouldn't report an error")
957958
assert.True(t, updated, "empty policy should cause runtime manager update")
958959
assert.Empty(t, components, "empty policy should produce empty component model")
959960
assert.True(t, otelUpdated, "empty policy should cause otel manager update")
@@ -1070,6 +1071,7 @@ service:
10701071
configChan <- cfgChange
10711072
coord.runLoopIteration(ctx)
10721073
assert.True(t, cfgChange.acked, "Coordinator should ACK a successful policy change")
1074+
assert.NoError(t, cfgChange.err, "config processing shouldn't report an error")
10731075

10741076
// Make sure the runtime manager received the expected component update.
10751077
// An assert.Equal on the full component model doesn't play nice with
@@ -1134,6 +1136,7 @@ service:
11341136
configChan <- cfgChange
11351137
coord.runLoopIteration(ctx)
11361138
assert.True(t, cfgChange.acked, "Coordinator should ACK a successful policy change")
1139+
assert.NoError(t, cfgChange.err, "config processing shouldn't report an error")
11371140

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

0 commit comments

Comments
 (0)