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

Clean up tests #56

Merged
merged 2 commits into from
Feb 11, 2025
Merged

Clean up tests #56

merged 2 commits into from
Feb 11, 2025

Conversation

tcharding
Copy link
Member

@tcharding tcharding commented Feb 10, 2025

Do some trivial integration test clean ups.

#[cfg(feature = "TODO")]
// TODO: We are getting an error for missing `pubkeys` field but the field is optional?
Copy link
Member

Choose a reason for hiding this comment

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

In 86dc357:

You need #[serde(default)] to make an Option<T> field actually optional. Otherwise it is required to be present and allowed to be null.

Copy link
Member Author

Choose a reason for hiding this comment

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

Legend. So that means all the other Option fields must be getting null because this is the first time I had this problem and its definitely not the first usage of Option. TIL. Thanks.

// node.mine_a_block();

// let json = node.client.get_address_info(&address).expect("getaddressinfo");
// assert!(json.into_model().is_ok());
Copy link
Member

Choose a reason for hiding this comment

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

In 86dc357:

Did you intend to add so much commented-out code in a PR titled "clean up tests"? Did you mean to call it "make tests less clean"? ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

lol, fair points. Although I do like that title - make tests less clean.

We have a function that funds the wallet - use it.
Add an additional call to `get_balance` after funding the wallet.
@apoelstra
Copy link
Member

utACK 13c8e9f

@tcharding tcharding merged commit c7ca552 into rust-bitcoin:master Feb 11, 2025
27 checks passed
@tcharding tcharding deleted the 02-10-testing branch February 11, 2025 16:57
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