From 46506506b6e36a3429e2f005f4e25768f153dbda Mon Sep 17 00:00:00 2001 From: "JJediny (merge automation)" Date: Sat, 10 Oct 2026 21:50:10 -0400 Subject: [PATCH] fix(tests): handle root-owned Falco logs in stack tests and increase trigger alert wait window --- tests/test_stack_integration.py | 7 +++++-- tools/trigger_alerts.py | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/test_stack_integration.py b/tests/test_stack_integration.py index ab82031..5c726ea 100644 --- a/tests/test_stack_integration.py +++ b/tests/test_stack_integration.py @@ -121,7 +121,11 @@ def test_osquery_stream_has_documents_in_openobserve() -> None: def test_otel_collector_watches_falco_file_when_present(repo_root: Path) -> None: FALCO_FILE_PATH.parent.mkdir(parents=True, exist_ok=True) - FALCO_FILE_PATH.touch(exist_ok=True) + if not FALCO_FILE_PATH.exists(): + try: + FALCO_FILE_PATH.touch(exist_ok=True) + except PermissionError: + pass _run(repo_root, ["docker", "compose", "restart", "otel-collector"]) @@ -130,4 +134,3 @@ def _watching_file() -> bool: return "Started watching file" in logs and "/var/log/falco/events.jsonl" in logs _wait_for(_watching_file) - diff --git a/tools/trigger_alerts.py b/tools/trigger_alerts.py index 7f9bfa2..dd585f1 100755 --- a/tools/trigger_alerts.py +++ b/tools/trigger_alerts.py @@ -460,8 +460,8 @@ def main() -> int: # Allow pipelines 3s to process and ship logs if args.all or args.stream: - print("\nWaiting 3 seconds for OpenTelemetry Collector and OpenObserve to process...") - time.sleep(3) + print("\nWaiting 6 seconds for OpenTelemetry Collector and OpenObserve to process...") + time.sleep(6) if args.all or args.verify: verify_all(minutes=args.window)