From ce2b26a6e02322bb1a9433d77ee72f63e13b72ac Mon Sep 17 00:00:00 2001 From: Alex Kavanagh Date: Thu, 4 May 2023 09:31:40 +0200 Subject: [PATCH] Use json.loads() to read results of password rotation usernames --- zaza/openstack/charm_tests/mysql/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zaza/openstack/charm_tests/mysql/tests.py b/zaza/openstack/charm_tests/mysql/tests.py index 2ed7f0f..c5e3f18 100644 --- a/zaza/openstack/charm_tests/mysql/tests.py +++ b/zaza/openstack/charm_tests/mysql/tests.py @@ -615,9 +615,9 @@ class MySQLInnoDBClusterRotatePasswordTests(MySQLCommonTests): 'list-service-usernames', action_params={} ) - usernames = action.data['results']['usernames'].split(',') - self.assertIn('keystone', usernames) + usernames = json.loads(action.data['results']['usernames']) logging.info("... usernames: %s", ', '.join(usernames)) + self.assertIn('keystone', usernames) # grab the password for keystone from the leader / to verify the change old_keystone_passwd_on_mysql = juju_utils.leader_get(