You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In any environment without the right env vars + reachable Bitsafe URL + funded devnet party, these panic or fail with HTTP 404 / 400 errors. They pollute cargo test --lib output and create false-failure noise that obscures real test failures.
Importantly, they were the only "tests" the parsers had before #46 — and they couldn't catch the v0.4.1 parser bug because they never reached the parser in any unconfigured environment.
Proposal
Two reasonable paths:
Move to tests/ directory (cargo's convention for integration tests) and gate behind a feature flag like devnet-integration:
Rename them with a clear prefix like devnet_integration_test_* and gate execution on an env var via #[ignore] + an opt-in pattern. Less clean but doesn't change the directory structure.
(1) is more idiomatic Rust and clearer to readers.
Follow-up from #46 / v0.4.2.
Context
src/*.rscontains 8 functions annotated#[test]that are actually integration tests against Bitsafe API and a real Canton devnet:batch::tests::test_batch_from_csvdistribute::tests::test_distributemint_redeem::attestor::tests::test_get_account_contract_rulesmint_redeem::attestor::tests::test_get_token_standard_contractsmint_redeem::mint::tests::test_create_deposit_account_with_credentialsmint_redeem::redeem::tests::test_create_withdraw_account_with_credentialssplit::tests::test_splittransfer::tests::test_submitIn any environment without the right env vars + reachable Bitsafe URL + funded devnet party, these panic or fail with HTTP 404 / 400 errors. They pollute
cargo test --liboutput and create false-failure noise that obscures real test failures.Importantly, they were the only "tests" the parsers had before #46 — and they couldn't catch the v0.4.1 parser bug because they never reached the parser in any unconfigured environment.
Proposal
Two reasonable paths:
Move to
tests/directory (cargo's convention for integration tests) and gate behind a feature flag likedevnet-integration:#![cfg(feature = "devnet-integration")]Run them only with
cargo test --features devnet-integration.cargo test --liband CI see only the deterministic unit tests (incl. the 23 newparser_testsblocks from fix: v0.4.1 parser regression — migrate cbtc-lib parsers to typed response models #46).Rename them with a clear prefix like
devnet_integration_test_*and gate execution on an env var via#[ignore]+ an opt-in pattern. Less clean but doesn't change the directory structure.(1) is more idiomatic Rust and clearer to readers.
Affected files
src/batch.rs,src/distribute.rs,src/mint_redeem/attestor.rs,src/mint_redeem/mint.rs,src/mint_redeem/redeem.rs,src/split.rs,src/transfer.rs.Out of scope