Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration tests #309

Merged
merged 4 commits into from
Mar 21, 2022
Merged

Conversation

sanket1729
Copy link
Member

@sanket1729 sanket1729 commented Mar 14, 2022

This is the final PR testing of many of the new features in the taproot miniscript release. This defines a new template language for checking all the Psbt APIs (and thereby all the miniscript ones).

    // K : Compressed key available
    // K!: Compressed key with corresponding secret key unknown
    // X: X-only key available
    // X!: X-only key with corresponding secret key unknown

    // Test 1: Simple spend with internal key
    let wit = test_desc::test_desc_satisfy(cl, testdata, "tr(X)");
    assert!(wit.len() == 1);

Right now, it does not test error cases, but I plan to update this framework so that we can also test those.

Based on #308 and #310

@sanket1729 sanket1729 force-pushed the add_desc_tests branch 4 times, most recently from 6fa2490 to e48415b Compare March 14, 2022 15:49
@sanket1729 sanket1729 marked this pull request as ready for review March 14, 2022 15:52
@sanket1729 sanket1729 force-pushed the add_desc_tests branch 2 times, most recently from 7477890 to 7a6c69d Compare March 14, 2022 17:10
Easier for writing future tests. There are no new tests added in this
commit. This only moves cpp tests into test_cpp, deletes read_file.rs
and moves common utilities to test_util.rs
Rework integration framework: Add generic descriptor satisfaction support
Also update block count in generatetoaddress for fast execution of
integration tests
0.21 does not have support for bech32m
Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK 13c4746

Wow, this is great!!

@sanket1729 sanket1729 merged commit cb1f244 into rust-bitcoin:master Mar 21, 2022
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.

2 participants