Skip to content

Commit

Permalink
Ceph iscsi default pool test (openstack-charmers#415)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Liam Young authored Sep 21, 2020
1 parent 540bd91 commit c5786d9
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion zaza/openstack/charm_tests/ceph/iscsi/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit c5786d9

Please sign in to comment.