[contract] Move lib.rs and market tests into integration suites#478
Merged
Olowodarey merged 1 commit intoArena1X:mainfrom Mar 29, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@Jay-Peter-Egemasi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Description
Moves the remaining inline contract tests out of
lib.rsandmarket.rsinto dedicated integration test files, while adding coverage for config fee validation, leaderboard ties, and duplicate market outcomes.Closes #324
Closes #326
Changes proposed
What were you told to do?
Combine the contract testing refactors for issues #324 and #326 into one PR by moving the inline
lib.rsandmarket.rstests intocontract/tests/, adding one new test per requested suite, updating imports, removing the inline test blocks, and running the contract tests.What did I do?
Test Suite Migration
lib.rsconfig tests intocontract/tests/config_tests.rs.lib.rsleaderboard tests intocontract/tests/leaderboard_tests.rs.market.rstest suite intocontract/tests/market_tests.rsand removed the unusedcontract/src/market_tests.rsfile.#[cfg(test)]blocks fromcontract/src/lib.rsandcontract/src/market.rs.New Coverage And Validation
test_config_update_validationto verify invalid protocol fee updates are rejected and existing config remains unchanged.test_leaderboard_tie_handlingto verify equal-point entries are preserved and readable through season point lookups.test_create_market_with_duplicate_outcomesand implemented duplicate-outcome validation in market creation.calculate_pricefor the moved market tests and added protocol fee validation used by the new config coverage.Check List (Check all the applicable boxes)
Screenshots / Testing Evidence
Validated with
cargo test --manifest-path contract/Cargo.toml --test config_tests,cargo test --manifest-path contract/Cargo.toml --test leaderboard_tests,cargo test --manifest-path contract/Cargo.toml --test market_tests, and a fullcargo test --manifest-path contract/Cargo.tomlpass.