Goal
Add integration tests covering the gaps in pipeline/pipeline_test.go: end-to-end flow with a real filter in the chain, and error propagation from a plugin through the pipeline error channel. Lifecycle, restart, and observer tests are already covered by the existing test suite.
Files
pipeline/pipeline.go (read)
pipeline/pipeline_test.go (extend)
Changes
Add at least:
TestPipelineFilterIntegration: a mock input emits a sequence of events, a mock filter drops or transforms a subset, a mock output captures the rest. Assert the output channel receives only the filtered events in order.
TestPipelineErrorPropagation: a mock plugin pushes an error onto its error channel; assert the error is observed on the pipeline's error channel within a bounded timeout.
The mock plugins should implement the existing plugin interface used elsewhere in the test file. Use channels with time.After based timeouts to avoid test hangs.
Verification
go test -v -race ./pipeline/...
Dependencies
None.
Goal
Add integration tests covering the gaps in
pipeline/pipeline_test.go: end-to-end flow with a real filter in the chain, and error propagation from a plugin through the pipeline error channel. Lifecycle, restart, and observer tests are already covered by the existing test suite.Files
pipeline/pipeline.go(read)pipeline/pipeline_test.go(extend)Changes
Add at least:
TestPipelineFilterIntegration: a mock input emits a sequence of events, a mock filter drops or transforms a subset, a mock output captures the rest. Assert the output channel receives only the filtered events in order.TestPipelineErrorPropagation: a mock plugin pushes an error onto its error channel; assert the error is observed on the pipeline's error channel within a bounded timeout.The mock plugins should implement the existing plugin interface used elsewhere in the test file. Use channels with
time.Afterbased timeouts to avoid test hangs.Verification
Dependencies
None.