Goal
Add tests for the event filter plugin covering single-type, multi-type, empty-filter (pass-all), and unknown-type cases. The package currently lacks a test file.
Files
filter/event/event.go, filter/event/plugin.go, filter/event/option.go (read)
filter/event/event_test.go (new)
Changes
Add at least:
TestEventFilterSingleType: configure the filter for a single event type, push events of varying types through the plugin, assert only the matching type passes.
TestEventFilterMultipleTypes: configure two or more allowed types, assert all matching events pass and others are dropped.
TestEventFilterPassAll: configure with an empty allow list, assert all events pass through unchanged.
TestEventFilterUnknownType: send an event with an unknown type string, assert the filter handles it (per the documented semantics, either drops or passes; match implementation).
Verification
go test -v -race ./filter/event/...
Dependencies
None.
Goal
Add tests for the event filter plugin covering single-type, multi-type, empty-filter (pass-all), and unknown-type cases. The package currently lacks a test file.
Files
filter/event/event.go,filter/event/plugin.go,filter/event/option.go(read)filter/event/event_test.go(new)Changes
Add at least:
TestEventFilterSingleType: configure the filter for a single event type, push events of varying types through the plugin, assert only the matching type passes.TestEventFilterMultipleTypes: configure two or more allowed types, assert all matching events pass and others are dropped.TestEventFilterPassAll: configure with an empty allow list, assert all events pass through unchanged.TestEventFilterUnknownType: send an event with an unknown type string, assert the filter handles it (per the documented semantics, either drops or passes; match implementation).Verification
Dependencies
None.