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 support for pure integration tests #458

Merged
merged 3 commits into from
Dec 8, 2024

Conversation

ok300
Copy link
Contributor

@ok300 ok300 commented Nov 16, 2024

Description

This PR embeds the mint_url in the HttpClient itself, since every of its methods was anyway always with the wallet's mint_url as arg.

This has a few other benefits:

  • it will make it easier to encapsulate logic for mints with multiple URLs inside HttpClient ("if URL A fails, try URL B")
  • it makes "pure integration tests" possible, which can call and test mint methods without the extra HTTP layer

Notes to the reviewers


Suggested CHANGELOG Updates

CHANGED

Add support for pure integration tests


Checklist

@ok300 ok300 force-pushed the ok300-simplify-integration-tests branch from ba26c41 to f506e6d Compare November 16, 2024 09:46
@ok300 ok300 changed the title Simplify integration tests Add support for pure integration tests Nov 18, 2024
@ok300 ok300 force-pushed the ok300-simplify-integration-tests branch from 7a6bca5 to 479bc12 Compare November 21, 2024 04:47
Copy link
Collaborator

@thesimplekid thesimplekid left a comment

Choose a reason for hiding this comment

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

ACK 479bc12

Nice, This is a good improvement.

@thesimplekid thesimplekid added this to the v0.6.0 milestone Dec 5, 2024
@ok300 ok300 force-pushed the ok300-simplify-integration-tests branch from 479bc12 to 6f0b2de Compare December 7, 2024 13:32
@ok300
Copy link
Contributor Author

ok300 commented Dec 7, 2024

I rebased to include the recent Uuid change.

I also had to add an explicit conversion between the String and Uuid request / response types for the DirectMintConnection used in the pure integration tests : 03adfff

@ok300 ok300 force-pushed the ok300-simplify-integration-tests branch from 6f0b2de to 03adfff Compare December 7, 2024 13:43
@ok300 ok300 requested a review from thesimplekid December 7, 2024 13:45
Copy link
Collaborator

@thesimplekid thesimplekid left a comment

Choose a reason for hiding this comment

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

ACK 03adfff

@thesimplekid thesimplekid merged commit 86c4c2d into cashubtc:main Dec 8, 2024
42 checks passed
vnprc pushed a commit to vnprc/cdk that referenced this pull request Dec 18, 2024
* Embed mint_url as a field of HttpClient

* Create pure integration tests

* DirectMintConnection: convert between String and Uuid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants