chore(test): relocate bridge-as-gateway no-longer-fails pin to multidoc test file#209
Conversation
…oc test file TestContract_Errors_MultidocBridgeAsGateway_NoLongerFails lived in contract_errors_test.go but stopped pinning an error contract once BridgeConfig emission landed — it now asserts a clean render. A future reader landing in contract_errors_test.go on the name prefix would expect a fail-test and find an assert-clean-render test instead. Move the function next to TestContract_NetworkMultidoc_BridgeConfigEmitted in contract_network_multidoc_test.go so the file location matches the contract being pinned, and rename it to TestContract_NetworkMultidoc_BridgeAsGateway_NoLongerFails to fit the surrounding naming convention. The bridgeAsGatewayLookup fixture moves alongside its sole consumer; no other test in the package references it. Section header `=== Bridge as gateway: no longer fails ===` added in the new location to match the file's existing indexing style (`=== Section ===` markers used throughout). Catalogue header in contract_errors_test.go renumbered: item 4 dropped, items 5/6 renumbered to 4/5, with a one-line pointer to the new home of the bridge-as-gateway pin so a reader who indexes the file by that catalogue is led to the right place. Pure relocation + comment cleanup; test logic and assertions unchanged. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR reorganizes test coverage for the bridge-as-gateway network scenario, moving its passing test case from the error contract tests file to the network multidoc contracts file. The fail catalogue comment is updated, the old test and fixture are removed, and new test infrastructure is added in the target location. ChangesBridge-as-Gateway Test Reorganization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request moves the TestContract_Errors_MultidocBridgeAsGateway_NoLongerFails test and its associated lookup function from pkg/engine/contract_errors_test.go to pkg/engine/contract_network_multidoc_test.go. This relocation reflects that the "bridge as gateway" scenario is no longer an error condition since BridgeConfig emission was implemented. I have no feedback to provide as there were no review comments.
Closes #168.
What
Pure test relocation:
TestContract_Errors_MultidocBridgeAsGateway_NoLongerFailsand itsbridgeAsGatewayLookupfixture move frompkg/engine/contract_errors_test.gotopkg/engine/contract_network_multidoc_test.go, with the test renamed toTestContract_NetworkMultidoc_BridgeAsGateway_NoLongerFailsto fit the destination file's naming convention.Why
The test stopped pinning an error contract once
BridgeConfigemission landed — it now asserts a clean render. Hosting it undercontract_errors_test.go(which catalogues fail-shape tests) was misleading; a reader landing on the name prefix expects a fail-test.Scope
bridgeAsGatewayLookupfixture moved alongside its sole consumer.// === Bridge as gateway: no longer fails ===added in the new location to match the file's existing// === Section ===style.contract_errors_test.gorenumbered: items 5/6 → 4/5, with a one-line pointer to the new home of the bridge-as-gateway pin.No production code touched. Test logic and assertions unchanged.
Validation
go test ./... -count=1all greengolangci-lint run ./...0 issuesSummary by CodeRabbit