test: skip dimsim path-replanning e2e when OPENAI_API_KEY unset#2632
Conversation
test_path_replanning drives the unitree-go2-agentic blueprint, which deploys SpeakSkill -> OpenAITTSNode and the agentic stack, both of which require OPENAI_API_KEY at module start. Without the key the blueprint fails to start and the test errors out instead of skipping. Add @pytest.mark.skipif_no_openai (already used by every other dimos/e2e_tests test) so it skips cleanly when the key is absent, while still running on the self-hosted-large runner where the secret is set.
Greptile SummaryThis PR adds
Confidence Score: 5/5Safe to merge — each change is a one-line marker addition that mirrors the established pattern in every other OpenAI-dependent e2e test. All three changes are additive-only: they add a well-understood skip marker that is already registered in conftest.py and used correctly across the rest of the suite. No test logic, fixtures, or blueprints are modified. The marker correctly converts to a skip when the key is absent and is a no-op when the key is present, so there is no regression risk for the self-hosted runner that carries the secret. No files require special attention. Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant pytest
participant conftest as conftest.py (pytest_collection_modifyitems)
participant env as Environment
participant test as test_*
pytest->>conftest: collect items
conftest->>env: os.getenv("OPENAI_API_KEY")
alt key absent
env-->>conftest: None / empty
conftest->>test: "add pytest.mark.skip(reason="OPENAI_API_KEY not set")"
test-->>pytest: SKIPPED
else key present
env-->>conftest: key value
test-->>pytest: RUN → start_blueprint("unitree-go2-agentic") → OpenAITTSNode
end
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant pytest
participant conftest as conftest.py (pytest_collection_modifyitems)
participant env as Environment
participant test as test_*
pytest->>conftest: collect items
conftest->>env: os.getenv("OPENAI_API_KEY")
alt key absent
env-->>conftest: None / empty
conftest->>test: "add pytest.mark.skip(reason="OPENAI_API_KEY not set")"
test-->>pytest: SKIPPED
else key present
env-->>conftest: key value
test-->>pytest: RUN → start_blueprint("unitree-go2-agentic") → OpenAITTSNode
end
Reviews (2): Last reviewed commit: "test: skip remaining dimsim e2e tests wh..." | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## release/0.0.13 #2632 +/- ##
=================================================
Coverage ? 71.00%
=================================================
Files ? 892
Lines ? 79237
Branches ? 7081
=================================================
Hits ? 56266
Misses ? 21131
Partials ? 1840
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
test_walk_forward and test_go_to_the_bed both drive the unitree-go2-agentic blueprint (same OpenAI-backed agentic stack + SpeakSkill as test_path_replanning), so they also error at blueprint startup without OPENAI_API_KEY. Add @pytest.mark.skipif_no_openai to both, matching every other agentic e2e test. This covers all three dimos/e2e_tests/test_dimsim_*.py tests.
What
Adds
@pytest.mark.skipif_no_openaitotest_path_replanningindimos/e2e_tests/test_dimsim_path_replaning.py.Why
test_path_replanningruns theunitree-go2-agenticblueprint, which deploysSpeakSkill→OpenAITTSNodeplus the agentic stack. Those construct an OpenAI client at modulestart()and hard-requireOPENAI_API_KEY. Without the key the blueprint fails to start and the test errors rather than skipping:Every other test under
dimos/e2e_tests/already carries@pytest.mark.skipif_no_openai(test_patrol_and_follow,test_spatial_memory,test_person_follow,test_dimos_cli_e2e,test_scan_and_follow_person,test_security_module). This one was the lone holdout.The marker is registered in
conftest.pyand converts to a real skip whenOPENAI_API_KEYis absent. Theself_hosted_largemarker is unchanged, so it still runs on the self-hosted-large runner (which has the secret).Test
(Previously this errored at blueprint startup.)