tests: improve unit test coverage and set threshold#296
Open
pdp2121 wants to merge 7 commits into
Open
Conversation
Collaborator
Author
|
/ai-review |
kuan121
approved these changes
May 6, 2026
ckeshava
reviewed
May 7, 2026
| id: Option<Cow<'a, str>>, | ||
| destination_account: Cow<'a, str>, | ||
| destination_amount: Currency<'a>, | ||
| destination_amount: Amount<'a>, |
Collaborator
There was a problem hiding this comment.
Can we flag this type change in the changelog? Currency -> Amount. Thanks for fixing it.
Collaborator
There was a problem hiding this comment.
technically, this is a breaking change, but I am not suggesting a major-version upgrade for this ^^
| #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Display)] | ||
| #[strum(serialize_all = "snake_case")] | ||
| #[serde(rename_all = "snake_case")] | ||
| #[serde(tag = "role")] |
Collaborator
There was a problem hiding this comment.
Can we call out this change in the changelog? Theoretically, this is a breaking change because the serialized version of this enum will no longer have the role discriminator.
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.
High Level Overview of Change
Brings xrpl-rust unit-test coverage in line with 85% line gate by adding ~120 unit tests to previously-untested or low-coverage files, and reframing what "unit-test coverage" measures.
Tests added
enable_amendment,set_fee,unl_modify) — 0% → 91–94%xchain_add_claim_attestation(0% → 92%),xchain_commit(45% → 95%)bridge,xchain_owned_claim_id,objects/mod.rs) — 0% → 87–100%utils/str_conversionandutils/get_xchain_claim_id— 0% → 98–100%models/results/mod.rsdispatcher (17% → 58%), and low-coverage result typesaccount_tx/ledger_entry/tx/nftoken— 0–34% → 98–100%txn_parserinternals (nodes,parser,utils/mod) — 51–62% → 97–100%check_cancel,escrow_cancel,set_regular_key,ticket_create,payment_channel_fund,check_create) — 68–80% → 97%transaction/mod.rs(calculate_fee_per_transaction_type) — 0% → 44%CI changes
asynch/clients/**), sync wrappers around network calls (account/,ledger/,transaction/mod.rs), and the faucet client. These are exercised by the existing tests/integration/ suite (behind the integration feature flag) and would more naturally fit a separate integration-coverage gate.Context of Change
xrpl-py is currently at 85% unit-test and 70% integration test coverage.
Type of Change
Test Plan
All CI tests pass.
Add integration test coverage threshold