Skip to main content

cja/testing/
mod.rs

1#[cfg(feature = "testing")]
2pub mod mock_oauth;
3#[cfg(feature = "postgres")]
4pub mod test_db;
5
6/// Remove inherited telemetry credentials and TLS test settings from a child.
7pub fn scrub_telemetry_env(cmd: &mut std::process::Command) -> &mut std::process::Command {
8    for (key, _) in std::env::vars_os() {
9        if ["POSTHOG_", "EYES_", "OTEL_", "SSL_CERT_"]
10            .iter()
11            .any(|prefix| key.to_string_lossy().starts_with(prefix))
12        {
13            cmd.env_remove(key);
14        }
15    }
16    cmd
17}