SatoshiPortal / boltz-rust

Boltz client rust crate
https://docs.boltz.exchange
30 stars 16 forks source link

Test Framework + Claim/Refund Integration tests #24

Closed rajarshimaitra closed 4 months ago

rajarshimaitra commented 4 months ago

This PR adds a basic test framework using the bitcoind crate. This is useful to test spending logic in regtest and verify that the most crucial part of the library is working. These tests are enforced in CI too.

This PR adds two integration tests using dummy swap values.

i5hi commented 4 months ago

YES! Regtest framework!! :))))

rajarshimaitra commented 4 months ago

Test failing becuase apparently cfg!(test) macro doesn't have any effect on the integration test. We need to set Network::Regtest for int test to handle address generation correctly.

There are two possible workaround:

I am inclining for the first option as it seems more cleaner.