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],
|
||||
timeout: float = 30.0,
|
||||
delay: float = 0.1,
|
||||
) -> None:
|
||||
) -> ops.pebble.ChangeID:
|
||||
"""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
|
||||
return change_id
|
||||
|
||||
def stop_services(
|
||||
self,
|
||||
services: List[str],
|
||||
timeout: float = 30.0,
|
||||
delay: float = 0.1,
|
||||
) -> None:
|
||||
) -> ops.pebble.ChangeID:
|
||||
"""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
|
||||
return change_id
|
||||
|
||||
class _OSTestingModelBackend(_TestingModelBackend):
|
||||
def get_pebble(self, socket_path: str) -> _OSTestingPebbleClient:
|
||||
|
@@ -24,7 +24,7 @@ from zaza.openstack.charm_tests.keystone.setup import (
|
||||
|
||||
SERVICE_CODES = {
|
||||
# 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": [requests.codes.bad_request],
|
||||
}
|
||||
|
Reference in New Issue
Block a user