test: add mainnet probe devtools#940
Conversation
ovitrif
left a comment
There was a problem hiding this comment.
Just did a review, for the current state, which is a draft. Added a few nits, and, otherwise, this is a GO and LGTM 👏
I think you can handle this, feel free to continue and ask me for review / help when/if needed.
| ) | ||
|
|
||
| override suspend fun execute(deps: DevToolsProvider.Dependencies): DevResult { | ||
| val amountSats = args.amountSats ?: args.amountMsat?.div(1_000u) |
There was a problem hiding this comment.
nit: try to use args.amountMsat?.let { msatCeilOf(it) } instead of args.amountMsat?.div(1_000u) if it's still satisfying your requirements
| context = TAG, | ||
| ) | ||
|
|
||
| return deps.lightningRepo().sendProbeForInvoice(args.bolt11, amountSats) |
There was a problem hiding this comment.
caution: This should work, but make sure the app is open and a wallet with LN funds is loaded, otherwise the node will not start and the OP will timeout.
|
|
||
| assertTrue(result.isSuccess) | ||
| assertEquals(setOf(probePaymentA), result.getOrThrow().paymentIds) | ||
| verifyBlocking(lightningService) { sendProbesUsingAmount("lnbc1", 42_000uL) } |
There was a problem hiding this comment.
nit: verifyBlocking shouldn't be needed, we're already in a suspend block, that's why we wrap tests in test { … }.
Unfortunately Codex always defaults to prefer it, it's smart but not applicable here.
Addresses https://github.com/synonymdev/bitkit-nightly/issues/10
Companion PRs:
Description
This PR:
Preview
N/A
QA Notes
Manual Tests
@probe_mainnetE2E spec from feat: add mainnet probe tests bitkit-e2e-tests#155 against a mainnet automation APK.Automated Checks
./gradlew compileDevDebugKotlin./gradlew testDevDebugUnitTest./gradlew detekt