From c5786d9184629cd7c6b60aae63e6b1e946e4360b Mon Sep 17 00:00:00 2001 From: Liam Young Date: Mon, 21 Sep 2020 13:40:48 +0100 Subject: [PATCH] Ceph iscsi default pool test (#415) * Add Ceph-iscsi Erasure coding check Add a test which created a ceph iscsi target backed by an erasure coded pool. * Fix EC pool type * Test ceph iscsi target from default pool --- .../openstack/charm_tests/ceph/iscsi/tests.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/zaza/openstack/charm_tests/ceph/iscsi/tests.py b/zaza/openstack/charm_tests/ceph/iscsi/tests.py index 08a760763..a377f0fb7 100644 --- a/zaza/openstack/charm_tests/ceph/iscsi/tests.py +++ b/zaza/openstack/charm_tests/ceph/iscsi/tests.py @@ -98,7 +98,7 @@ def create_iscsi_target(self, ctxt): ctxt['gw1_entity_id'], ctxt['gw2_entity_id']), 'iqn': self.GW_IQN, - 'rbd-pool-name': ctxt['pool_name'], + 'rbd-pool-name': ctxt.get('pool_name', ''), 'ec-rbd-metadata-pool': ctxt.get('ec_meta_pool_name', ''), 'image-size': ctxt['img_size'], 'image-name': ctxt['img_name'], @@ -197,6 +197,23 @@ def test_create_and_mount_ec_backed_volume(self): self.mount_iscsi_target(ctxt) self.check_client_device(ctxt) + def test_create_and_mount_volume_default_pool(self): + """Test creating a target and mounting it on a client.""" + self.create_data_pool() + ctxt = self.get_base_ctxt() + client_entity_id = ctxt['client_entity_ids'][2] + ctxt.update({ + 'client_entity_id': client_entity_id, + 'client_initiatorname': self.get_client_initiatorname( + client_entity_id), + 'chap_username': 'myiscsiusername3', + 'chap_password': 'myiscsipassword3', + 'img_size': '3G', + 'img_name': 'disk_default_1'}) + self.create_iscsi_target(ctxt) + self.mount_iscsi_target(ctxt) + self.check_client_device(ctxt) + def test_pause_resume(self): """Test pausing and resuming a unit.""" with self.pause_resume(