Merge pull request #4 from openstack-charmers/test-updates

Wait for Sync completed workload status
This commit is contained in:
Ryan Beisner 2018-04-13 09:51:00 -05:00 committed by GitHub
commit 2feade3af0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 16 deletions

View File

@ -18,8 +18,9 @@
Basic glance-simplestreams-sync functional tests.
"""
import time
import amulet
import re
import time
from charmhelpers.contrib.openstack.amulet.deployment import (
OpenStackAmuletDeployment
@ -54,14 +55,20 @@ class GlanceBasicDeployment(OpenStackAmuletDeployment):
u.log.info('Waiting on extended status checks...')
# NOTE(beisner): This charm lacks support for juju workload status.
# That means that this charm will not affirm a ready state for those
# waiting for a ready state through tools like juju-wait, leading to
# anticipated race conditions and automation blocking conditions.
exclude_services = ['glance-simplestreams-sync']
# NOTE(thedac): This charm has a non-standard workload status.
# The default match for ready will fail. Check the other charms
# for standard workload status and check this charm for Sync
# completed.
# Check for ready
exclude_services = ['glance-simplestreams-sync']
self._auto_wait_for_status(exclude_services=exclude_services)
# Check for Sync completed
self._auto_wait_for_status(re.compile('Sync completed.*',
re.IGNORECASE),
include_only=exclude_services)
self.d.sentry.wait()
self._initialize_tests()
@ -230,13 +237,3 @@ class GlanceBasicDeployment(OpenStackAmuletDeployment):
openstack_release=self._get_openstack_release())
if ret:
amulet.raise_status(amulet.FAIL, msg=ret)
def test_115_memcache(self):
u.validate_memcache(self.glance_sentry,
'/etc/glance/glance-api.conf',
self._get_openstack_release(),
earliest_release=self.trusty_mitaka)
u.validate_memcache(self.glance_sentry,
'/etc/glance/glance-registry.conf',
self._get_openstack_release(),
earliest_release=self.trusty_mitaka)