Add integration tests for SSH Command using pytest-homeassistant-custom-component#8
Draft
Add integration tests for SSH Command using pytest-homeassistant-custom-component#8
Conversation
Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add integration tests for Task Tracker component
Add integration tests for SSH Command using pytest-homeassistant-custom-component
Mar 17, 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.
Adds real Home Assistant integration tests (using
pytest-homeassistant-custom-component) mirroring the pattern from task_tracker PR #21, and relocates unit tests fromtest/totests/unit_tests/.Test structure
tests/unit_tests/— existing unit tests (moved fromtest/; path depth updated fromparent×3→parent×4)tests/integration_tests/conftest.py— createscustom_components/ssh_command → <repo_root>symlink at test collection time so HA's loader discovers the component; providesauto_enable_custom_integrationsfixturetests/integration_tests/test_integration.py— 29 tests against a live in-processHomeAssistantinstance, with onlyasyncsshpatched outIntegration test coverage
TestSetupEntryhass.data, service registered, single-instance guardTestUnloadEntryTestConfigFlowTestExecuteServiceSuccessTestExecuteServiceKnownHostscheck_known_hosts=False→None, custom/missing file, default~/.ssh/known_hostsTestExecuteServiceValidation_validate_service_dataerror paths, including no coordinator presentTestExecuteServiceErrorsHostKeyNotVerifiable,PermissionDenied,TimeoutError,gaierror, genericOSError)Infra changes
requirements_integration_tests.txt—pytest-homeassistant-custom-component==0.13.318pytest.ini—asyncio_mode = auto.github/workflows/integration-tests.yml— new CI job runningpytest tests/integration_tests/ -vtest.ymlupdated todiscover -s tests/unit_testspylint.ymlignore-paths updated to^tests/.*$run_tests.shupdated totests/unit_tests.gitignoreexcludescustom_components/(created at runtime byconftest.py)📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.