tests: framework for wallet cpp <> live daemon tests #9547
+714
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new functional test for direct wallet2 -> live RPC daemon interactions. The functional RPC tests currently test a wallet RPC -> live RPC daemon (to be clear, the functional tests currently use the wallet RPC as opposed to directly using wallet2 as this PR introduces).
The initial motivation for this framework was testing the new Seraphis lib async scanner with a live daemon (source). I used wallet2 as a base test to demonstrate the async scanner achieves the same expected results. The async scanner was/is a large enough component in and of itself that warranted direct testing with a live daemon (plus, setting up the wallet RPC to use the async scanner is its own significant task that is likely to take months of work, and testing the async scanner with a daemon in isolation enables smoother incremental progress).
More recently, @SNeedlewoods began an effort to add functions to the wallet API as part of a larger effort to deprecate wallet2 and replace it with the wallet API (#9464). In the latest "Monero Tech" (/"No Wallet Left Behind") working group meeting, @SNeedlewoods mentioned they would like a test framework to test the wallet API with a live daemon. They started using the existing libwallet API tests, however, those tests require manually starting daemons and running bash scripts. The reason I chose to implement this framework as part of the existing functional test framework is that there is already an automated setup established to start live daemons and execute daemon commands. I figure @SNeedlewoods may find it useful to reuse this framework to test their work as well.
I can keep this PR in draft status until another dependent PR wants it merged, since it's not testing anything uncovered by existing tests as is.
Note: this PR would also significantly reduce the diff and review burden for the async scanner (UkoeHB#23) when that is ready to be PR'd to the main repo.