Skip to content

add monero_wallet integration tests#974

Open
fxrstor wants to merge 1 commit into
eigenwallet:masterfrom
fxrstor:master
Open

add monero_wallet integration tests#974
fxrstor wants to merge 1 commit into
eigenwallet:masterfrom
fxrstor:master

Conversation

@fxrstor
Copy link
Copy Markdown

@fxrstor fxrstor commented Apr 28, 2026

related to issue #800

  • covers the required test scope
  • renames monero-wallet crate to monero_wallet because apparently there's a name conflict which prevents the tests from running with default parameters.
  • introduces an integration_test macro. inline async closures can keep captured wallet resources alive past the test body, which can race with harness teardown and trigger a segfault during c++ wallet destruction. the macro moves test logic into a separate async function passed to setup_test which gives wallet resources a clearer drop boundary before teardown.

test results (i3-4160):
test_results

Copy link
Copy Markdown

Review pass for #800.

This looks materially stronger than the older #847 approach: the patch applies cleanly to current master, the Docker test matrix includes the new monero_wallet test binaries, and the scope covers lifecycle, receive/history/transfer, swap wallet, Tauri listener, and node switching.

Local checks:

  • gh pr diff 974 --repo eigenwallet/core --patch | git apply --check --whitespace=nowarn passes.
  • git diff --check passes after applying the patch in a temp clone.
  • cargo check -p monero_wallet --tests reaches the existing monero-sys build script blocker in my temp clone because Monero C++ sources/submodules are not present (src/wallet/api/wallet.cpp not found). I could not run the Docker tests in this environment.

Review notes:

  • TauriWalletListener is made public so integration tests can construct it directly. That widens the crate API for test access. If that API is not meant to be public, consider moving those direct listener tests into an internal test module or routing coverage through Wallets::new(..., Some(tauri_handle), ...).
  • The package/directory rename from monero-wallet to monero_wallet is a broad but understandable way to avoid the Cargo package-name collision with upstream monero-wallet. I searched for stale monero-wallet/, "monero-wallet", and monero-wallet = references after applying the patch and only found the intentional upstream workspace dependency alias.
  • The Tauri listener tests manually invoke callback methods and assert that UI updates were emitted. That is useful callback coverage, but it does not prove real wallet event delivery from the C++ listener path. I would treat it as listener callback coverage, not full event-wiring coverage.

Net: once CI/Docker confirms the runtime tests, this seems like the best current #800 candidate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants