Use json.loads() to read results of password rotation usernames

This commit is contained in:
Alex Kavanagh
2023-05-04 09:31:40 +02:00
parent a61653d031
commit ce2b26a6e0

View File

@@ -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(