Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Masp E2E tests #1714

Closed
wants to merge 39 commits into from
Closed

Refactor Masp E2E tests #1714

wants to merge 39 commits into from

Conversation

batconjurer
Copy link
Member

@batconjurer batconjurer commented Jul 13, 2023

The MASP E2E tests are notoriously difficult to maintain and debug. This PR introduces new tooling under integration tests that allows the ledger and client to be run in a single process. Theses tests are designed to be deterministic and can have debugger attached.

While this tooling can be used for more than MASP e2e tests, those test are the one's I've refactored as PoC as they are highest priority.

Integration tests are currently run via a separate command make test-integration. This would require a new ci job. However, as the can be run in parallel, they could be run along with the unit tests. However, they are still quite time intensive.

Furthermore, the tests directory will need to be built using nightly to enable a feature the integration tests need (for now).

This PR depends on #1670 , #1667, and #1738

tests/Cargo.toml Outdated Show resolved Hide resolved
Co-authored-by: Tomas Zemanovic <tomas@heliax.dev>
tests/Cargo.toml Outdated Show resolved Hide resolved
tests/src/lib.rs Outdated Show resolved Hide resolved
tzemanovic added a commit that referenced this pull request Jul 21, 2023
* bat/refactor-masp-e2e:
  changelog: add #1714
  rustdoc: rm links to private symbols
  clippy fix
  make: build tests with nightly
  tests: enable feature(internal_output_capture) for tests only
  [feat]: Re-used code from the cli using new CliApi type
  [chore]: Move mock definitions into apps to re-restrict visibility. Better implementation of mock stdin
  [chore]: Replaced dev with testing feature flag on stio redirect func
  [chore]: Re-add #[cfg(test)] to test router modules
  Update apps/src/lib/cli/utils.rs
  Update tests/src/integration/masp.rs
  [chore]: Add lazy_static as workspace dep
  Update tests/Cargo.toml
  [chore]: Making the docs happy
  [chore]: Removed unnecessary  visibility qualifier
  [fix]: Cleanups
  [fix]: Resolved conflicts with eth bridge cli changes
  [fix]: Indentified flakiness in masp_txs_and_queries
  [feat]: All masp e2e tests refactored into integration tests. Update Makefile with integration test recipes
  [feat]: Added masp_txs_and_queries integration test which passes. Removed e2e tests which now have passing integration counterparts
  [feat]: Added masp pinned tx test which passes
  [fix]: Porting over masp incentives e2e test
  [fix]: Fixed the faucet to use uint instead of amount. This makes it portable across different assets
  [feat]: First basic integration test passing with plumbing
  [feat]: Implement mock cli and client for integration tests
  converts faucet_withdrawal_limit to be correct
  fixup! WIP refactoring masp e2e tests
  WIP refactoring masp e2e tests
Fraccaman added a commit that referenced this pull request Jul 21, 2023
* origin/bat/refactor-masp-e2e:
  changelog: add #1714
  rustdoc: rm links to private symbols
  clippy fix
  make: build tests with nightly
  tests: enable feature(internal_output_capture) for tests only
  [feat]: Re-used code from the cli using new CliApi type
  [chore]: Move mock definitions into apps to re-restrict visibility. Better implementation of mock stdin
  [chore]: Replaced dev with testing feature flag on stio redirect func
  [chore]: Re-add #[cfg(test)] to test router modules
  Update apps/src/lib/cli/utils.rs
  Update tests/src/integration/masp.rs
  [chore]: Add lazy_static as workspace dep
  Update tests/Cargo.toml
  [chore]: Making the docs happy
  [chore]: Removed unnecessary  visibility qualifier
  [fix]: Cleanups
  [fix]: Resolved conflicts with eth bridge cli changes
  [fix]: Indentified flakiness in masp_txs_and_queries
  [feat]: All masp e2e tests refactored into integration tests. Update Makefile with integration test recipes
  [feat]: Added masp_txs_and_queries integration test which passes. Removed e2e tests which now have passing integration counterparts
  [feat]: Added masp pinned tx test which passes
  [fix]: Porting over masp incentives e2e test
  [fix]: Fixed the faucet to use uint instead of amount. This makes it portable across different assets
  [feat]: First basic integration test passing with plumbing
  [feat]: Implement mock cli and client for integration tests
  converts faucet_withdrawal_limit to be correct
  fixup! WIP refactoring masp e2e tests
  WIP refactoring masp e2e tests
Fraccaman added a commit that referenced this pull request Jul 22, 2023
* bat/refactor-masp-e2e-history:
  refator e2e masp tests
@Fraccaman Fraccaman closed this Jul 22, 2023
@tzemanovic
Copy link
Member

merged in 0.20.0

@tzemanovic tzemanovic mentioned this pull request Aug 7, 2023
2 tasks
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.

5 participants