ci: fix e2e-100mb CI test by setting _setup_env() inside the test
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user