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

Use existing node to run e2e tests in dev #2047

Merged
merged 4 commits into from
Jan 8, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions crates/e2e/macro/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ pub struct E2EConfig {
/// The type of the architecture that should be used to run test.
#[darling(default)]
backend: Backend,
/// The URL to the running node. If not set then a default node instance will be
/// spawned per test.
/// The URL to the running node. See [`Self::node_url()`] for more details.
node_url: Option<String>,
}

Expand Down Expand Up @@ -77,10 +76,12 @@ impl E2EConfig {
self.backend.clone()
}

/// The URL to the running node. If not set then a default node instance will be
/// spawned per test.
/// The URL to the running node, default to `CONTRACTS_NODE_URL` if not set.
/// If no URL is provided, then a default node instance will be spawned per test.
pub fn node_url(&self) -> Option<String> {
self.node_url.clone()
self.node_url
.clone()
.or_else(|| std::env::var("CONTRACTS_NODE_URL").ok())
ascjones marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down
Loading