rust-payjoin icon indicating copy to clipboard operation
rust-payjoin copied to clipboard

Not --all-features test suite

Open benalleng opened this issue 3 months ago • 3 comments

Got everything compiling, however based on the current cfg flag layout in the integration tests, all the tests are run when v1 is enabled and none of the tests run when v2 is enabled

Closes #1019

Pull Request Checklist

Please confirm the following before requesting review:

  • [x] I have disclosed my use of AI in the body of this PR.

    I had chatgpt help me clean up some clones in the SenderBuilder while i was transitioning over to the NoopSessionPersister

  • [x] I have read CONTRIBUTING.md and rebased my branch to produce hygienic commits.

benalleng avatar Sep 03 '25 19:09 benalleng

Pull Request Test Coverage Report for Build 18915659489

Details

  • 113 of 123 (91.87%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 83.581%

Changes Missing Coverage Covered Lines Changed/Added Lines %
payjoin/src/core/uri/v1.rs 104 114 91.23%
<!-- Total: 113 123
Totals Coverage Status
Change from base Build 18915517369: 0.003%
Covered Lines: 8990
Relevant Lines: 10756

💛 - Coveralls

coveralls avatar Sep 03 '25 19:09 coveralls

My guess is that the v2 tests are relying on the URI builder from v1. We may need another builder that's v2-specific OR to expose this utility without feature gating it. The former seems more appropriate.

let mut pj_uri =
                build_v1_pj_uri(&pj_receiver_address, EXAMPLE_URL, OutputSubstitution::Enabled)?;

Its only the v2_to_v1 test that requires this setup whereas all the others rely on the usual session to create a pj_uri. I guess we could create a pj_uri with a session like that but then it really wouldn't be a v1 receiver

benalleng avatar Sep 03 '25 21:09 benalleng

Ah, and in that case it makes sense to test only with v1 compiled. Needs further investigation I suppose.

DanGould avatar Sep 03 '25 23:09 DanGould