handle stdout v Stdout

This commit is contained in:
Liam Young
2020-09-23 17:04:19 +00:00
parent 76e7666f9c
commit ad1ea7667d

View File

@@ -199,7 +199,13 @@ class CephISCSIGatewayTest(test_utils.BaseCharmTest):
run = await zaza.model.async_run_on_unit(
ctxt['client_entity_id'],
ls_bdevice_cmd.format(bdevice=device_ctxt['bdevice']))
return device_ctxt['bdevice'] in run['Stdout']
# Juju have moved to using 'stdout' rather than 'Stdout' so handle
# either.
try:
stdout = run['stdout']
except KeyError:
stdout = run['Stdout']
return device_ctxt['bdevice'] in stdout
logging.info("Checking {} is present on {}".format(
device_ctxt['bdevice'],