Add support for pure integration tests #458

Merged
ok300 merged 3 commits from ok300-simplify-integration-tests into main 2024-12-08 14:33:58 +00:00
ok300 commented 2024-11-16 09:30:20 +00:00 (Migrated from github.com)

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

### 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 <!-- In this section you can include notes directed to the reviewers, like explaining why some parts of the PR were done in a specific way --> ----- ### Suggested [CHANGELOG](https://github.com/cashubtc/cdk/blob/main/CHANGELOG.md) Updates <!-- Please do not edit the actual changelog but note what you changed here. --> #### CHANGED Add support for pure integration tests ---- ### Checklist * [x] I followed the [code style guidelines](https://github.com/cashubtc/cdk/blob/main/CODE_STYLE.md) * [x] I ran `just final-check` before committing
thesimplekid (Migrated from github.com) approved these changes 2024-12-02 17:42:45 +00:00
thesimplekid (Migrated from github.com) left a comment

ACK 479bc12f095540cb818c263530db062b4d229bf8

Nice, This is a good improvement.

ACK 479bc12f095540cb818c263530db062b4d229bf8 Nice, This is a good improvement.
ok300 commented 2024-12-07 13:35:59 +00:00 (Migrated from github.com)

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 : 03adfff411

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 : 03adfff411ad906124accbd53e64aa34e8208f97
thesimplekid (Migrated from github.com) approved these changes 2024-12-08 14:33:25 +00:00
thesimplekid (Migrated from github.com) left a comment
ACK 03adfff411ad906124accbd53e64aa34e8208f97
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cashubtc/cdk!458
No description provided.