tests: add integration test suite for clawrtc-rs public API (Closes #16256) [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT] - #56
Open
waterWang wants to merge 1 commit into
Conversation
Adds 6 new integration tests covering the remaining public API surface: - cpu_arch_multipliers_all_variants — all 8 CpuArch multiplier values - cpu_arch_family_strings — all 8 CpuArch family() return values - cpu_arch_arch_strings — all 8 CpuArch arch_str() return values - wallet_from_private_key_roundtrips — raw 32-byte key roundtrip - wallet_from_hex_edge_cases — empty, short, long, exact-length hex - wallet_verify_edge_cases — empty pubkey, empty sig, wrong lengths Closes Scottcjn/rustchain-bounties#16256
Owner
|
Checked this today. The work is not the problem — the PR is blocked on a failing check: test.
If the failure looks like it is our config rather than your change, say so here and I will check. That has already turned out to be the case on several PRs today. Apologies for the delay in telling you. |
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.
Integration test suite for clawrtc-rs public API
Closes Scottcjn/rustchain-bounties#16256
Summary
The crate handles Ed25519 wallets and hardware attestation — critical for signing. This PR extends the integration test suite in
tests/public_api.rsto cover the remaining public API surface that was previously untested.Previously the suite had 7 integration tests. This PR adds 6 new integration tests (now 13 total) covering:
New tests
CpuArch::multiplier()(all 8 variants)cpu_arch_multipliers_all_variantsCpuArch::family()(all 8 variants)cpu_arch_family_stringsCpuArch::arch_str()(all 8 variants)cpu_arch_arch_stringsWallet::from_private_key()wallet_from_private_key_roundtripsWallet::from_hex()edge caseswallet_from_hex_edge_casesWallet::verify()validationwallet_verify_edge_casesCoverage of remaining public API items
wallet_roundtrip_sign_verify_and_rejection_paths— generate → serialize → deserialize → same address/pubkey; sign → verify; verify fails on tampered message, tampered signature, wrong keyrtc_address_vectors_are_stable— 3 fixed RFC 8032 keypairs with expectedRTC…addressesattestation_is_deterministic_for_fixed_inputs+malformed_attestation_returns_error_without_panickingwallet_result_apis_reject_invalid_inputs,node_read_result_apis_reject_invalid_json,enroll_returns_node_error_for_rejected_input, plus newwallet_verify_edge_casesandwallet_from_hex_edge_casesVerification
cargo test --all-targetspasses: 8 unit + 13 integration = 21 tests, all greenassert!(true)filler).github/workflows/ci.yml) and runscargo test --all-targetson push/PR