fix: make E2E tests fail-loud in CI instead of silently skipping 🐛#37
Merged
Klazomenai merged 2 commits intomainfrom Mar 31, 2026
Merged
fix: make E2E tests fail-loud in CI instead of silently skipping 🐛#37Klazomenai merged 2 commits intomainfrom
Klazomenai merged 2 commits intomainfrom
Conversation
Replace is_node_running with require_node that panics when CI env var is set and no EVM node is reachable. Locally, tests still skip gracefully. Prevents false positives when Anvil fails to start in CI. Refs #5
There was a problem hiding this comment.
Pull request overview
Updates the Rust E2E test harness to avoid false-positive CI passes by making “missing EVM node” a hard failure under CI while preserving local developer-friendly skipping.
Changes:
- Replace
is_node_runningchecks in E2E tests with a centralizedrequire_nodehelper. - Make
require_nodepanic when the node is unreachable in CI (CIenv var set) and print+skip locally. - Update E2E module docs to reflect Anvil/EVM-node usage and CI behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/e2e.rs |
Switches all node-availability guards to require_node and updates top-level E2E documentation. |
tests/common/mod.rs |
Introduces require_node helper that panics in CI on node unreachability and skips locally. |
Comments suppressed due to low confidence (1)
tests/common/mod.rs:117
require_nodereturnsfalseon an invalid/malformedrpc_urlparse. In CI this will still cause the calling tests to return early (skip) rather than fail-loud, which reintroduces the false-positive problem this PR is trying to fix. Consider panicking in CI on URL parse errors as well (and optionally include the parse error in the message).
let url: url::Url = match rpc_url.parse() {
Ok(u) => u,
Err(_) => return false,
};
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address Copilot review: propagate the underlying error in both the URL parse and get_block_number failure paths. Also panic in CI on malformed RPC URL to prevent silent skip false positives. Refs #5
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
is_node_runningwithrequire_nodeintests/common/mod.rsCIenv var set): panics if EVM node is unreachable — no more false positivesRefs #5
Test plan
unset CI)CI=true)