Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ STRATEGY_PLUGIN_ALERT_TELEGRAM_CHAT_IDS=

# ── Execution Report ──
EXECUTION_REPORT_OUTPUT_DIR=/tmp/quant_runtime_reports
EXECUTION_REPORT_GCS_URI=gs://qsl-runtime-logs-shared/execution-reports
EXECUTION_REPORT_GCS_URI=gs://your-bucket/execution-reports
QSL_EXECUTION_REPORT_GCS_URI=
31 changes: 31 additions & 0 deletions tests/test_env_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from __future__ import annotations

from pathlib import Path
from urllib.parse import urlsplit


ROOT = Path(__file__).resolve().parents[1]
ENV_EXAMPLE = ROOT / ".env.example"


def _env_value(name: str) -> str:
prefix = f"{name}="
matches = [
line.removeprefix(prefix)
for line in ENV_EXAMPLE.read_text(encoding="utf-8").splitlines()
if line.startswith(prefix)
]
assert len(matches) == 1
return matches[0]


def test_execution_report_gcs_uri_uses_public_placeholder() -> None:
value = _env_value("EXECUTION_REPORT_GCS_URI")

assert value == "gs://your-bucket/execution-reports"
parsed = urlsplit(value)
assert parsed.scheme == "gs"
assert parsed.netloc == "your-bucket"
assert parsed.path == "/execution-reports"
assert not parsed.query
assert not parsed.fragment
Loading