ci: fix e2e-100mb CI test by setting _setup_env() inside the test
InboxOS — PR CI / Fast offline tests (pull_request) Successful in 28s
InboxOS — PR CI / 100MB historical e2e (pull_request) Successful in 8m47s
InboxOS — PR CI / Live Ollama extract smoke (pull_request) Successful in 40s

The e2e_100mb test calls hp.main([]) which calls from_env() on
S3Config, NocoConfig, LLMConfig, and HistoricalConfig. Each of
those requires env vars (SEAWEEDFS_S3_*, NOCODB_*, etc.). On a
local machine the test runner's main() helper happens to call
_setup_env() at the top, but when invoked directly via

    python - <<'PY'
    from test_historical_pipeline_offline import test_e2e_100mb_synthetic_mbox
    test_e2e_100mb_synthetic_mbox()
    PY

(as the PR CI workflow does) the helper is bypassed and the test
fails with config_error: SEAWEEDFS_S3_BUCKET is not set.

Fix: call _setup_env() inside the e2e test itself, so it works
under any runner (unittest, pytest, heredoc, CI, ad-hoc).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
cto
2026-06-07 22:35:26 +00:00
committed by Paperclip CTO
parent 3eba1acd66
commit 288cfcbc86
@@ -404,6 +404,7 @@ def test_e2e_100mb_synthetic_mbox() -> None:
print(f" built synthetic mbox: {n_messages} messages, {size:,} bytes")
# 2. Run the pipeline end-to-end. All external services stubbed.
_setup_env()
fake_s3 = FakeS3()
fake_s3.put_object(
Bucket="inboxos-eml",