From 9c7e794326f225902f11039f8e088376ef499978 Mon Sep 17 00:00:00 2001 From: Peter Sabaini Date: Mon, 20 Jan 2025 15:37:41 +0100 Subject: [PATCH] Fix: ceph-rbd-mirror testing action handling Signed-off-by: Peter Sabaini --- zaza/openstack/charm_tests/ceph/rbd_mirror/tests.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zaza/openstack/charm_tests/ceph/rbd_mirror/tests.py b/zaza/openstack/charm_tests/ceph/rbd_mirror/tests.py index 68520108d..1abf2245d 100644 --- a/zaza/openstack/charm_tests/ceph/rbd_mirror/tests.py +++ b/zaza/openstack/charm_tests/ceph/rbd_mirror/tests.py @@ -503,11 +503,11 @@ def execute_failover_juju_actions(self, 'pools': ','.join(primary_site_pools) }) logging.info(result) - self.assertEqual(int(result.get('Code')), 0) + self.assertEqual(int(result.results["return-code"]), 0) # Validate that the demoted pools count matches the total primary site # pools count. - n_pools_demoted = len(result.get('Stdout').split('\n')) + n_pools_demoted = len(result.results["output"].split('\n')) self.assertEqual(len(primary_site_pools), n_pools_demoted) # At this point, both primary and secondary sites are demoted. Validate @@ -537,11 +537,11 @@ def execute_failover_juju_actions(self, 'pools': ','.join(secondary_site_pools) }) logging.info(result) - self.assertEqual(int(result.get('Code')), 0) + self.assertEqual(int(result.results["return-code"]), 0) # Validate that the promoted pools count matches the total secondary # site pools count. - n_pools_promoted = len(result.get('Stdout').split('\n')) + n_pools_promoted = len(result.results["output"].split('\n')) self.assertEqual(len(secondary_site_pools), n_pools_promoted) # Validate that the Ceph images from the newly promoted site @@ -711,7 +711,7 @@ def test_203_juju_resync(self): 'i-really-mean-it': True, }) logging.info(result) - self.assertEqual(int(result.get('Code')), 0) + self.assertEqual(int(result.results["return-code"]), 0) # Validate that the Ceph images from site-b report 'up+replaying' # (which is reported by secondary Ceph images). And check that images