test: Simplify mock responses in service health check tests
Some checks failed
Integration Tests / integration-tests (push) Failing after 20s
Integration Tests / performance-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 49s
Service Adapters (Python FastAPI) / test (3.13) (push) Failing after 53s
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 55s
Service Adapters (Python FastAPI) / build (push) Has been skipped
Some checks failed
Integration Tests / integration-tests (push) Failing after 20s
Integration Tests / performance-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 49s
Service Adapters (Python FastAPI) / test (3.13) (push) Failing after 53s
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 55s
Service Adapters (Python FastAPI) / build (push) Has been skipped
### Summary of Changes - Consolidated mock response definitions in the `test_get_services` method for improved readability. - Enhanced maintainability of the test suite by streamlining the structure of service status mock data. ### Expected Results - Improved clarity in test definitions, making it easier to understand the expected service responses. - Facilitated future updates to the test suite by reducing complexity in mock data setup.
This commit is contained in:
@@ -50,27 +50,9 @@ class TestGeneralRoutes:
|
||||
|
||||
# Mock the health check results
|
||||
mock_check_services.return_value = {
|
||||
"home_assistant": {
|
||||
"status": "unknown",
|
||||
"response_time": None,
|
||||
"error": None,
|
||||
"uptime": None,
|
||||
"metadata": {}
|
||||
},
|
||||
"frigate": {
|
||||
"status": "unknown",
|
||||
"response_time": None,
|
||||
"error": None,
|
||||
"uptime": None,
|
||||
"metadata": {}
|
||||
},
|
||||
"immich": {
|
||||
"status": "disabled",
|
||||
"response_time": None,
|
||||
"error": None,
|
||||
"uptime": None,
|
||||
"metadata": {}
|
||||
}
|
||||
"home_assistant": {"status": "unknown", "response_time": None, "error": None, "uptime": None, "metadata": {}},
|
||||
"frigate": {"status": "unknown", "response_time": None, "error": None, "uptime": None, "metadata": {}},
|
||||
"immich": {"status": "disabled", "response_time": None, "error": None, "uptime": None, "metadata": {}},
|
||||
}
|
||||
|
||||
response = client.get("/services")
|
||||
|
||||
Reference in New Issue
Block a user