test(genai): add 44 offline tests for commands/docker.py DockerManager#2004
Merged
Conversation
Covers _run_cmd (6), get_container_status (6), check_service_health (9), start/stop/restart_service (8), get_logs (3), check_gpu (4), register/execute (8). All offline with mocked subprocess/requests — no Docker dependency.
jsboige
added a commit
that referenced
this pull request
Jun 1, 2026
#2004) Covers _run_cmd (6), get_container_status (6), check_service_health (9), start/stop/restart_service (8), get_logs (3), check_gpu (4), register/execute (8). All offline with mocked subprocess/requests — no Docker dependency.
This was referenced Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds comprehensive offline test coverage for
commands/docker.py(DockerManagerclass, 370 lines).Test classes (44 tests, 0.26s)
TestRunCmdTestGetContainerStatusTestCheckServiceHealthTestStartStopServiceTestGetLogsTestCheckGpuTestRegisterAndExecuteDesign
unittest.mock.patchsys.modules["config"]stub (same pattern as test_genai_audio_models)str().replace("\\", "/")Why
commands/docker.pyis the core Docker management module used bygenai.py docker status/start/stop/restart/logs/test. Previously had 0 dedicated tests.Test plan
python -m pytest scripts/notebook_tools/tests/test_genai_docker.py -v # 44 passed in 0.26s