Re-order change of expected workload status

After recent changes to zaza workload status code the present
ordering does no longer work.
This commit is contained in:
Frode Nordahl
2021-05-13 06:15:46 +02:00
parent 7dd96c8fb1
commit d51a28dc04
+18 -5
View File
@@ -107,23 +107,36 @@ def configure_octavia():
'amp-ssh-pub-key': base64.b64encode(
bytes(ssh_public_key, 'utf-8')).decode('utf-8'),
}
logging.info('Configuring certificates for mandatory Octavia '
'client/server authentication '
'(client being the ``Amphorae`` load balancer instances)')
# Tell Octavia charm it is safe to create cloud resources, we do this now
# because the workload status will be checked on config-change and it gets
# a bit complicated to augment test config to accept 'blocked' vs. 'active'
# in the various stages.
logging.info('Running `configure-resources` action on Octavia leader unit')
zaza.model.run_action_on_leader(
'octavia',
'configure-resources',
action_params={})
# Our expected workload status will change after we have configured the
# certificates
test_config = zaza.charm_lifecycle.utils.get_charm_config()
del test_config['target_deploy_status']['octavia']
logging.info('Configuring certificates for mandatory Octavia '
'client/server authentication '
'(client being the ``Amphorae`` load balancer instances)')
_singleton = zaza.openstack.charm_tests.test_utils.OpenStackBaseTest()
_singleton.setUpClass(application_name='octavia')
with _singleton.config_change(charm_config, charm_config):
# wait for configuration to be applied then return
pass
# Tell Octavia charm it is safe to create cloud resources
logging.info('Running `configure-resources` action on Octavia leader unit')
# Should we consider making the charm attempt to create this key on
# config-change?
logging.info('Running `configure-resources` action again to ensure '
'Octavia Nova SSH key pair is created after config change.')
zaza.model.run_action_on_leader(
'octavia',
'configure-resources',