test: accept rustledger v0.14 query error categorization#132
Merged
Conversation
Prepares the test suite for rustledger v0.14, where bare-word/empty queries are routed through the compilation path instead of the parse path. Assertions are broadened to accept either categorization so they pass on both v0.13.x and v0.14.x. The interpolation snapshot mismatch in `test_api_errors` is not addressed here — the v0.14 wording change (`cannot infer currency` → `multiple postings missing amounts`) needs `pytest --snapshot-update` run against the v0.14.x WASM artifact. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
test_query_errorsandtest_query_to_fileto accept eitherQueryParseErrororQueryCompilationErrorfor bare-word queries (rustledger v0.14 routes these through the compilation path).test_api_query_result_errorto accept either"Query parse error"or"Query compilation error"in the response.These changes are forward-compatible — they pass on both rustledger ≤0.13 and v0.14.
Why
The bot-generated v0.14.0 upgrade PR (#131) is failing 4 tests against current rustledger v0.14.x because the upstream changed how it categorizes some query errors. Two of the four (
test_query_errors,test_query_to_file) and one of the API tests (test_api_query_result_error) are pure assertion mismatches and can be loosened onmainahead of the upgrade.The 4th failing test (
test_api_errorssnapshot) is not addressed here — the interpolation error wording changed from"cannot infer currency for posting to"→"multiple postings missing amounts for". That requirespytest --snapshot-updateagainst a v0.14.x WASM artifact and should be folded into the upgrade PR itself.Test plan
maintest_query_errors,test_query_to_file,test_api_query_result_errorall greentest_api_errorshappens in the upgrade PR (not here)🤖 Generated with Claude Code