Fix linting issue in testing framework
Add 503 as possible return code for Gnocchi. It's unavailable without Ceph. Change-Id: I3516374b875b6d89408a4fe05c8e73d6e29ba19d Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
This commit is contained in:
@@ -726,20 +726,22 @@ def get_harness( # noqa: C901
|
|||||||
services: list[str],
|
services: list[str],
|
||||||
timeout: float = 30.0,
|
timeout: float = 30.0,
|
||||||
delay: float = 0.1,
|
delay: float = 0.1,
|
||||||
) -> None:
|
) -> ops.pebble.ChangeID:
|
||||||
"""Record start service events."""
|
"""Record start service events."""
|
||||||
super().start_services(services, timeout, delay)
|
change_id = super().start_services(services, timeout, delay)
|
||||||
container_calls.add_start(self.container_name, services) # type: ignore
|
container_calls.add_start(self.container_name, services) # type: ignore
|
||||||
|
return change_id
|
||||||
|
|
||||||
def stop_services(
|
def stop_services(
|
||||||
self,
|
self,
|
||||||
services: List[str],
|
services: List[str],
|
||||||
timeout: float = 30.0,
|
timeout: float = 30.0,
|
||||||
delay: float = 0.1,
|
delay: float = 0.1,
|
||||||
) -> None:
|
) -> ops.pebble.ChangeID:
|
||||||
"""Record stop service events."""
|
"""Record stop service events."""
|
||||||
super().stop_services(services, timeout, delay)
|
change_id = super().stop_services(services, timeout, delay)
|
||||||
container_calls.add_stop(self.container_name, services) # type: ignore
|
container_calls.add_stop(self.container_name, services) # type: ignore
|
||||||
|
return change_id
|
||||||
|
|
||||||
class _OSTestingModelBackend(_TestingModelBackend):
|
class _OSTestingModelBackend(_TestingModelBackend):
|
||||||
def get_pebble(self, socket_path: str) -> _OSTestingPebbleClient:
|
def get_pebble(self, socket_path: str) -> _OSTestingPebbleClient:
|
||||||
|
@@ -24,7 +24,7 @@ from zaza.openstack.charm_tests.keystone.setup import (
|
|||||||
|
|
||||||
SERVICE_CODES = {
|
SERVICE_CODES = {
|
||||||
# gnocchi is not started because no ceph relation
|
# gnocchi is not started because no ceph relation
|
||||||
"gnocchi": [requests.codes.bad_gateway],
|
"gnocchi": [requests.codes.bad_gateway, requests.codes.service_unavailable],
|
||||||
"heat-cfn": [requests.codes.bad_request],
|
"heat-cfn": [requests.codes.bad_request],
|
||||||
"heat": [requests.codes.bad_request],
|
"heat": [requests.codes.bad_request],
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user