feat(e2e): add test mode infrastructure with BTERMINAL_TEST env isolation
Rust: watcher.rs/fs_watcher.rs skip watchers in test mode, is_test_mode Tauri command. Frontend: wake-scheduler disable, App.svelte test mode detection. AppConfig centralization in bterminal-core (OnceLock pattern for path overrides).
This commit is contained in:
parent
d1a4d9f220
commit
4097253921
18 changed files with 346 additions and 29 deletions
|
|
@ -34,8 +34,11 @@ pub fn init() -> TelemetryGuard {
|
|||
.with_target(true)
|
||||
.compact();
|
||||
|
||||
// In test mode, never export telemetry (avoid contaminating production data)
|
||||
let is_test = std::env::var("BTERMINAL_TEST").map_or(false, |v| v == "1");
|
||||
|
||||
match std::env::var("BTERMINAL_OTLP_ENDPOINT") {
|
||||
Ok(endpoint) if !endpoint.is_empty() => {
|
||||
Ok(endpoint) if !endpoint.is_empty() && !is_test => {
|
||||
match build_otlp_provider(&endpoint) {
|
||||
Ok(provider) => {
|
||||
let otel_layer = tracing_opentelemetry::layer()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue