From 2a4ad7f74e332d03e8bee57e454f47b0a88a488e Mon Sep 17 00:00:00 2001 From: Luciano Lo Giudice Date: Thu, 7 Oct 2021 22:07:00 -0300 Subject: [PATCH] Fix test for cinder-lvm Since the charm is now marked stateful, the 'host' attribute of a volume is mangled differently. This change makes the test more robust against future changes as well. --- zaza/openstack/charm_tests/cinder_lvm/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zaza/openstack/charm_tests/cinder_lvm/tests.py b/zaza/openstack/charm_tests/cinder_lvm/tests.py index a90c0bf..ae9bc92 100644 --- a/zaza/openstack/charm_tests/cinder_lvm/tests.py +++ b/zaza/openstack/charm_tests/cinder_lvm/tests.py @@ -91,7 +91,7 @@ class CinderLVMTest(test_utils.OpenStackBaseTest): self.assertTrue(test_vol) host = getattr(test_vol, 'os-vol-host-attr:host').split('#')[0] - self.assertTrue(host.startswith('cinder@LVM')) + self.assertIn('@LVM', host) def test_volume_overwrite(self): """Test creating a volume by overwriting one on a loop device."""