pub mod observations;
pub mod probes;
pub mod profile;
pub mod report;
pub mod scenario;
pub mod schema;
pub mod supervisor;
use std::time::Duration;
pub const ORACLE_GATE_VAR: &str = "EGRESS_PPROXY_CERTIFY";
pub fn oracle_gate_enabled() -> bool {
std::env::var(ORACLE_GATE_VAR)
.map(|v| v == "1")
.unwrap_or(false)
}
pub fn require_oracle_gate() {
if !oracle_gate_enabled() {
panic!(
"oracle tests require {}=1 and pproxy=={}",
ORACLE_GATE_VAR,
crate::differential::PINNED_PPROXY_VERSION
);
}
if !pproxy_available() {
panic!(
"pproxy not available; install with: pip install pproxy=={}",
crate::differential::PINNED_PPROXY_VERSION
);
}
}
fn pproxy_available() -> bool {
let python = crate::differential::find_python_binary();
std::process::Command::new(&python)
.args(["-c", "import pproxy"])
.stdout(std::process::Stdio::null())
.stderr(std::process::Stdio::null())
.status()
.map(|s| s.success())
.unwrap_or(false)
}
pub const DEFAULT_SCENARIO_TIMEOUT: Duration = Duration::from_secs(15);
pub const DEFAULT_STARTUP_TIMEOUT: Duration = Duration::from_secs(5);
pub const DEFAULT_IO_TIMEOUT: Duration = Duration::from_secs(3);