You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Spawn a maker server
fn test_makecli_get_new_address () {
// setup the bitcoind backend
// setup directoryd and get the address.
// setup the makerd datadir with maker.toml config values. (especially the dns).
// Gather all the relevant args for makerd and maker-cli. Maybe in two different structs.
// spawn the makerd thread and get a feed of the log via a mpsc channel. This will give fidelity address:amount to fund.
// Fund the fidelity address.
// wait for makerd to complete setup.
// Issue the maker-cli with suitable args
// hold the output
// assert the output.
// issue directory-cli to get the maker address and assert it.
}
fn test_dns() {
// setup the directoryd datadir with default configs. Just specifiy the config path.
// spawn the directoryd thread and get the log via mpsc channel.
// get the address of the server (local/tor).
// assert that address is of specific value.
}
fn test_taker() {
// spawn the bitcoind.
// gather all the args for taker-cli.
// issue the cli command for taker stuffs.
// hold and assert the output.
}
fn test_standard_swap() {
// spawn the bitcoind
// start the dns and get its address.
// setup maked wirh args and dns address (including fidelity).
// gather args for taker-cli.
// do coinswap.
// assert success.
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Approach for creating a test framework for cli apps.
Use
std::process:Command
to issue cli commands.reference https://github.com/bitcoindevkit/bdk-cli/blob/master/tests/integration.rs
Beta Was this translation helpful? Give feedback.
All reactions