Two separate breakages from the first green-ish CI run:
1. tests/hs.rs asserted on a constant, which clippy rejects under
-D warnings (clippy::assertions_on_constants) because the compiler
folds the assert away. Compare through a runtime binding instead.
2. The release workflow built the aarch64 binary fine (13m02s, verified
ARM ELF) but the publish step died with:
/var/run/act/workflow/3: line 6: scripts/publish-release.sh: No such file or directory
run: steps execute with act's cwd, not the repo root, so relative
paths miss. Pin every run step with cd "${GITHUB_WORKSPACE}" (the
pattern the osint-dashboard workflow already relies on).
Verified locally before pushing: cargo test 41 passed, cargo clippy
--all-targets -- -D warnings clean.
22 lines
716 B
Rust
22 lines
716 B
Rust
//! HS publish wait and CBT floor — 180s fail-closed cuts a working HsDir upload.
|
|
|
|
use std::time::Duration;
|
|
|
|
use onionwire::hs;
|
|
|
|
#[test]
|
|
fn publish_wait_covers_hsdir_retries() {
|
|
assert!(
|
|
hs::PUBLISH_WAIT >= Duration::from_secs(360),
|
|
"180s cuts a working HsDir publish while status is still Bootstrapping"
|
|
);
|
|
}
|
|
|
|
#[test]
|
|
fn cbt_min_timeout_floor_is_at_least_10s() {
|
|
// Drive the comparison through a runtime value: asserting on the constant
|
|
// directly is folded away by the compiler and clippy rejects it under
|
|
// -D warnings (clippy::assertions_on_constants).
|
|
let floor_ms = hs::CBT_MIN_TIMEOUT_MS;
|
|
assert!(floor_ms >= 10_000, "learned CBT ~1s kills HsDir circuits");
|
|
}
|