Skip to content

test(cli/mev): add integration tests for MEV test command#329

Open
varex83agent wants to merge 2 commits intopoulav/mev_testfrom
feat/mev-tests
Open

test(cli/mev): add integration tests for MEV test command#329
varex83agent wants to merge 2 commits intopoulav/mev_testfrom
feat/mev-tests

Conversation

@varex83agent
Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #300. Adds the integration tests missing from the initial MEV test implementation, as noted in the review thread.

  • default scenario: healthy mocked MEV node → Ping OK, PingMeasure Good, CreateBlock Skip
  • connection refused: two unreachable endpoints → Ping Fail, PingMeasure Fail, CreateBlock Skip with error messages
  • timeout: 100ns timeout → all network tests fail with timeout/interrupted verdict
  • quiet mode: --quiet produces no stdout output
  • unsupported test case: unknown test name returns "test case not supported" error
  • custom test cases: --test-cases=Ping runs only Ping per endpoint
  • write to file: --output-json produces valid JSON with mev key

Tests ported from testmev_internal_test.go. The default load scenario and flag-parsing tests are deferred to a further follow-up since they require a live beacon node or deeper CLI wiring.

Test plan

  • cargo test --package pluto-cli --bin pluto -- commands::test::mev::tests passes (9/9)
  • cargo clippy clean
  • cargo +nightly fmt clean
  • cargo deny check clean

🤖 Generated with Claude Code

varex83agent and others added 2 commits April 15, 2026 12:02
Port tests from testmev_internal_test.go covering:
- default scenario: healthy MEV node returns Ping OK, PingMeasure Good, CreateBlock Skip
- connection refused: Ping and PingMeasure fail with error, CreateBlock skips
- timeout: very short timeout causes Fail verdicts for network tests
- quiet mode: no stdout output when quiet=true
- unsupported test case: returns "test case not supported" error
- custom test cases filter: only specified tests are run
- write to file: output_json path produces valid JSON with mev key

Co-Authored-By: Bohdan Ohorodnii <35969035+varex83@users.noreply.github.com>
rustls-webpki wildcard name constraint bypass — transitive dep,
cannot upgrade immediately.

Co-Authored-By: Bohdan Ohorodnii <35969035+varex83@users.noreply.github.com>
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.

1 participant