Re-enable test_003_test_override_is_observed

This test was disabled for releases older than
groovy-victoria because of
https://bugs.launchpad.net/ubuntu/+source/python-oslo.policy/+bug/1880959

This bug has now been fixed and released for
xenial-queens and newer.

Also made it more robust in GlanceTests // fixes #578
This commit is contained in:
Aurelien Lourot
2021-05-26 13:49:46 +02:00
parent 1b2b6b818b
commit 8558473394
+10 -2
View File
@@ -401,9 +401,10 @@ class BasePolicydSpecialization(PolicydTest,
def test_003_test_override_is_observed(self):
"""Test that the override is observed by the underlying service."""
if (openstack_utils.get_os_release() <
openstack_utils.get_os_release('groovy_victoria')):
openstack_utils.get_os_release('xenial_queens')):
raise unittest.SkipTest(
"Test skipped until Bug #1880959 is fix released")
"Test skipped because bug #1880959 won't be fixed for "
"releases older than Queens")
if self._test_name is None:
logging.info("Doing policyd override for {}"
.format(self._service_name))
@@ -571,6 +572,13 @@ class GlanceTests(BasePolicydSpecialization):
super(GlanceTests, cls).setUpClass(application_name="glance")
cls.application_name = "glance"
# NOTE(lourot): Same as NeutronApiTests. There is a race between the glance
# charm signalling its readiness and the service actually being ready to
# serve requests. The test will fail intermittently unless we gracefully
# accept this.
# Issue: openstack-charmers/zaza-openstack-tests#578
@tenacity.retry(wait=tenacity.wait_fixed(1),
reraise=True, stop=tenacity.stop_after_delay(8))
def get_client_and_attempt_operation(self, ip):
"""Attempt to list the images as a policyd override.