test: integration coverage for untested extrinsics across 8 pallets#1490
test: integration coverage for untested extrinsics across 8 pallets#1490mrq1911 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Claude Code Review
Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.
Tip: disable this comment in your organization's Code Review settings.
|
Crate versions that have been updated:
Runtime version has not been increased. |
There was a problem hiding this comment.
Pull request overview
Adds new runtime-level integration tests for previously pallet-only-covered stableswap extrinsics, closing identified gaps in the integration suite and bumping the integration test crate version accordingly.
Changes:
- Add a new
stableswap_extraintegration test module coveringbuy, proportionalremove_liquidity,withdraw_asset_amount, and authority-gated peg/amp admin extrinsics. - Wire the new module into the integration test crate (
lib.rs). - Bump
runtime-integration-testsfrom1.104.0to1.104.1(and updateCargo.lock).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| integration-tests/src/stableswap_extra.rs | Adds 8 new runtime integration tests for stableswap trading, liquidity withdrawal, and admin peg/amp updates. |
| integration-tests/src/lib.rs | Registers the new stableswap_extra module in the integration test crate. |
| integration-tests/Cargo.toml | Bumps runtime-integration-tests crate version to 1.104.1. |
| Cargo.lock | Updates lockfile entry for the runtime-integration-tests version bump. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Quick benchmark at commit e29e418 has been executed successfully. |
Adds full-runtime integration coverage for extrinsics that were exercised only at the pallet level. Gaps were identified from the runtime interaction graph's
prioritized_test_gapspack (entrypoints with no static integration-test link) and each was confirmed to have zero references inintegration-tests/src/before writing.84 new tests across 8 new modules:
stableswap_extra(8) —buy,remove_liquidity,withdraw_asset_amount,update_amplification,update_asset_peg_source,update_pool_max_peg_updatexyk_extra(5) —add_liquidity_with_limits,remove_liquidity_with_limits(slippage guards) + acreate_poolorphan-state regression (asserts the executive's storage layer rolls back a partial create)omnipool_extra(7) —remove_liquidity_with_limit,refund_refused_asset(all four error branches)hsm_admin_extra(4) —update_collateral_asset,remove_collateral_asset(snapshot-fork based)liquidity_mining_extra(15) — omnipool + xyk yield-farm lifecycle:stop/resume/update/terminate_yield_farm,terminate_global_farm,update_global_farmsignet(19) — full pallet:set_config,pause/unpause,sign,sign_bidirectional,withdraw_funds,respond/respond_error/respond_bidirectionalamm_misc_extra(8) —bonds::redeem,lbp::add_liquidity/remove_liquidity,currencies::transfer_native_currencyadmin_misc_extra(18) —dispatcher::dispatch_as_treasury,multi-payment::reset_payment_currency,gigahdx::set_pool_contract,dispenser(set_config/pause/unpause/request_fundguards)Notes / residual gaps (deliberately not faked):
signet::respond*only echo the caller's input as events — no on-chain signature validation, no authority gate, no pause check. Tests assert what exists; the missing gating is a finding worth a follow-up.dispenser::request_fundhappy path needs a signet MPC signing flow (keccak-derived request id) — impractical in integration; covered by itsNotConfigured/Pausedguard rejections instead.pallet-signetandpallet-dispenserasintegration-testsdev-dependencies.Verified locally: full crate compiles under
RUSTFLAGS=-D warnings,cargo fmt --checkclean, and all 84 new tests pass.runtime-integration-testsbumped to 1.104.2.