mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-20 23:16:17 -05:00
Consolidating controller tests. Fixing controller test cleanup which slowed down tests significantly.
This commit is contained in:
parent
b0be30c3d6
commit
2806673e25
11 changed files with 366 additions and 970 deletions
|
|
@ -162,18 +162,4 @@ class TestServiceLogsEndpoint:
|
|||
assert response.status_code == 200
|
||||
|
||||
|
||||
class TestOpenAPIIncludesServicesEndpoints:
|
||||
"""Tests that OpenAPI documentation includes services endpoints."""
|
||||
|
||||
def test_openapi_has_services_paths(self, test_client):
|
||||
"""OpenAPI schema should include services paths."""
|
||||
response = test_client.get("/openapi.json")
|
||||
data = response.json()
|
||||
assert "/api/services" in data["paths"]
|
||||
assert "/api/services/{name}" in data["paths"]
|
||||
assert "/api/services/{name}/start" in data["paths"]
|
||||
assert "/api/services/{name}/stop" in data["paths"]
|
||||
assert "/api/services/{name}/restart" in data["paths"]
|
||||
assert "/api/services/{name}/enable" in data["paths"]
|
||||
assert "/api/services/{name}/disable" in data["paths"]
|
||||
assert "/api/services/{name}/logs" in data["paths"]
|
||||
# OpenAPI endpoint-presence tests are consolidated in test_api.py::TestOpenAPI.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue