Skip to content

Commit f686970

Browse files
committed
test: make custom veilid network key opt-in in CI
1 parent d87be57 commit f686970

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/lint_and_test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ jobs:
3333
env:
3434
RUST_MIN_STACK: 8388608
3535
SAVE_VEILID_LOCAL_TEST_MODE: "1"
36-
SAVE_VEILID_TEST_NETWORK_KEY: save-rust-ci-${{ github.run_id }}-${{ github.run_attempt }}
3736
# Retries configured in .config/nextest.toml (nextest default path)
3837
# --no-fail-fast: run all tests in this PR subset even when some fail.
3938
# Exclude long P2P network convergence tests from PR CI; run them in dedicated/nightly workflows.

src/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,12 @@ mod tests {
9797
return;
9898
}
9999

100-
let network_key = env::var("SAVE_VEILID_TEST_NETWORK_KEY")
101-
.unwrap_or_else(|_| "save-rust-local-test-network".to_string());
102-
config.network.network_key_password = Some(network_key);
100+
if let Ok(network_key) = env::var("SAVE_VEILID_TEST_NETWORK_KEY") {
101+
let key = network_key.trim();
102+
if !key.is_empty() {
103+
config.network.network_key_password = Some(key.to_string());
104+
}
105+
}
103106

104107
// Keep test nodes deterministic and less noisy in CI.
105108
config.network.upnp = false;

0 commit comments

Comments
 (0)