refactor: address PR review feedback on tests, bridge error handling, and schema consistency#11
Merged
intel352 merged 2 commits intofeat/issue-2-unit-testsfrom Feb 23, 2026
Merged
Conversation
3 tasks
…actoring Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add unit tests for bento plugin modules, steps, and triggers
refactor: address PR review feedback on tests, bridge error handling, and schema consistency
Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses all actionable review comments from the initial test PR: silent error discard, weak round-trip assertions, list-format YAML bug, schema/implementation mismatch, brittle type assertions, and cross-file mock coupling.
Changes
bridge.go: PropagateMetaWalkMuterror instead of discarding with_bridge_test.go: Round-trip test now asserts body fields and metadata key/value are preserved, not just that the result is non-nilprocessor_step_test.go: Fixed context-cancellation test — was using YAML list format (- bloblang: ...) whichAddProcessorYAMLrejects, so the test never exercised cancellation; switched to single-object format and useserrors.Isfor the wrapped errorplugin.go: RemovedRequired: truefromprocessorsschema field — the constructor acceptsnilas pass-through, so the schema was incorrectly signaling the field is mandatoryplugin_test.go: Replaced allNewBentoPlugin().(*bentoPlugin)type assertions with SDK interface assertions (sdk.ModuleProvider,sdk.StepProvider,sdk.TriggerProvider,sdk.SchemaProvider); panics on future implementation changes instead of silently passingmocks_test.go(new):mockPublisher/mockSubscriberextracted frominput_module_test.gointo a dedicated shared file, eliminating implicit compilation dependencies across test files💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.