multi: Add tests to psbt and normal open channel flow.

Itests were added to the normal channel funding flow and the psbt
funding flow using unstable (unconfirmed sweeper inputs).
This commit is contained in:
ziggie committed 2024-04-24 13:58:20 +01:00
1 parent b954ee4c72
commit 351e9a68dd
8 files changed
+559 -2

No files matched your search

+1
View File
@@ -1205,6 +1205,7 @@ func (h *HarnessTest) OpenChannelAssertErr(srcNode, destNode *node.HarnessNode,
// Receive an error to be sent from the stream.
_, err := h.receiveOpenChannelUpdate(respStream)
require.NotNil(h, err, "expected channel opening to fail")
// Use string comparison here as we haven't codified all the RPC errors
// yet.
+10
View File
@@ -68,6 +68,16 @@ func (h *HarnessRPC) FundPsbt(
return resp
}
// FundPsbtAssertErr makes a RPC call to the node's FundPsbt and asserts an
// error is returned.
func (h *HarnessRPC) FundPsbtAssertErr(req *walletrpc.FundPsbtRequest) {
ctxt, cancel := context.WithTimeout(h.runCtx, DefaultTimeout)
defer cancel()
_, err := h.WalletKit.FundPsbt(ctxt, req)
require.Error(h, err, "expected error returned")
}
// FinalizePsbt makes a RPC call to node's FinalizePsbt and asserts.
func (h *HarnessRPC) FinalizePsbt(
req *walletrpc.FinalizePsbtRequest) *walletrpc.FinalizePsbtResponse {