Skip to content

Conversation

@benalleng
Copy link
Collaborator

@benalleng benalleng commented Sep 3, 2025

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:

@benalleng benalleng changed the title No default feat tests No-default-feature test suite Sep 3, 2025
@benalleng benalleng force-pushed the no-default-feat-tests branch from 1158ab4 to c367b20 Compare September 3, 2025 19:34
@coveralls
Copy link
Collaborator

coveralls commented Sep 3, 2025

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%
Totals Coverage Status
Change from base Build 18915517369: 0.003%
Covered Lines: 8990
Relevant Lines: 10756

💛 - Coveralls

@benalleng benalleng force-pushed the no-default-feat-tests branch from c367b20 to ee62384 Compare September 3, 2025 19:54
cargo test --locked --package payjoin --verbose --no-default-features --features v1 --test integration

cargo test --locked --package payjoin --verbose --no-default-features --features v2 --lib
cargo test --locked --package payjoin --verbose --no-default-features --features v2 --test integration
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on the current cfg logic in the integration tests no tests run when v2 is the only thing enabled, perhaps someone could point me in the right direction on better splitting up the tests based on features

@benalleng benalleng force-pushed the no-default-feat-tests branch 3 times, most recently from 8e300b4 to 273378f Compare September 3, 2025 20:16
@benalleng benalleng force-pushed the no-default-feat-tests branch from 273378f to a0e0e98 Compare September 3, 2025 20:18
Copy link
Contributor

@DanGould DanGould left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)?;

@benalleng benalleng force-pushed the no-default-feat-tests branch 2 times, most recently from 4439740 to cea604e Compare September 3, 2025 20:43
@benalleng
Copy link
Collaborator Author

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

@DanGould
Copy link
Contributor

DanGould commented Sep 3, 2025

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

@benalleng benalleng marked this pull request as ready for review September 4, 2025 12:02
@benalleng benalleng changed the title No-default-feature test suite Not --all-features test suite Sep 4, 2025
@benalleng benalleng force-pushed the no-default-feat-tests branch 3 times, most recently from a258176 to ace4cf6 Compare September 8, 2025 17:59
@benalleng benalleng force-pushed the no-default-feat-tests branch 2 times, most recently from 257cc45 to b1f803f Compare September 15, 2025 15:30
@benalleng benalleng force-pushed the no-default-feat-tests branch 3 times, most recently from 32abaa0 to 91db3c6 Compare September 22, 2025 16:44
@benalleng benalleng closed this Oct 6, 2025
@benalleng benalleng deleted the no-default-feat-tests branch October 6, 2025 18:39
@benalleng benalleng restored the no-default-feat-tests branch October 6, 2025 18:39
@benalleng benalleng reopened this Oct 6, 2025
@DanGould DanGould removed their request for review October 7, 2025 15:17
@benalleng benalleng force-pushed the no-default-feat-tests branch from 91db3c6 to b790f30 Compare October 29, 2025 16:32
The uri tests were looking at bip21 uris with v1 or v2 specific features
and failing when the features were locked to the opposite feature
respectively.

I have moved the relevant tests to be in the correct module so that they
only compile within the correct feature.
This commit locks the integration tests down into their specific enabled
versions.
Add the test suite for the `contrib/test,sh` script in the payjoin
crate.
@benalleng benalleng force-pushed the no-default-feat-tests branch from b790f30 to 65f2cfd Compare October 29, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cargo test -p payjoin fails

3 participants