diff --git a/cinder/tests/unit/volume/drivers/dell_emc/vnx/mocked_vnx.yaml b/cinder/tests/unit/volume/drivers/dell_emc/vnx/mocked_vnx.yaml index 4bf28f32d65..cbeb9606236 100644 --- a/cinder/tests/unit/volume/drivers/dell_emc/vnx/mocked_vnx.yaml +++ b/cinder/tests/unit/volume/drivers/dell_emc/vnx/mocked_vnx.yaml @@ -355,7 +355,7 @@ test_migrate_lun_error: test_verify_migration: lun1: &src_lun - _propertis: + _properties: <<: *lun_base_prop lun2: &dst_lun _properties: @@ -1670,10 +1670,13 @@ test_do_create_cg_from_cgsnap: lun_id: 12 _methods: attach_snap: - lun: &src_lun_in_cg _methods: create_mount_point: *smp_from_src_lun + lun2: &new_lun + _properties: + poll: false + wwn: 'new_wwn' vnx: _properties: _methods: @@ -1682,7 +1685,8 @@ test_do_create_cg_from_cgsnap: *snapshot_test_delete_snapshot] get_lun: _side_effect: [*src_lun_in_cg, *smp_from_src_lun, - *smp_from_src_lun, *lun_migrate, *src_lun, *dst_lun] + *smp_from_src_lun, *new_lun, *lun_migrate, + *src_lun, *new_lun] get_pool: *pool_test_create_lun get_migration_session: *session_verify create_cg: *cg_for_create @@ -1695,7 +1699,8 @@ test_do_clone_cg: get_snap: *snapshot_test_delete_snapshot get_lun: _side_effect: [*src_lun_in_cg, *smp_from_src_lun, - *smp_from_src_lun, *lun_migrate, *src_lun, *dst_lun] + *smp_from_src_lun, *new_lun, *lun_migrate, + *src_lun, *new_lun] get_pool: *pool_test_create_lun get_migration_session: *session_verify create_cg: *cg_for_create diff --git a/cinder/tests/unit/volume/drivers/dell_emc/vnx/test_adapter.py b/cinder/tests/unit/volume/drivers/dell_emc/vnx/test_adapter.py index 83f0a4b92f6..3a0668da62b 100644 --- a/cinder/tests/unit/volume/drivers/dell_emc/vnx/test_adapter.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/vnx/test_adapter.py @@ -211,9 +211,9 @@ class TestCommonAdapter(test_base.TestCase): vnx_common.do_create_cg_from_cgsnap( cg_id, cg_host, volumes, cgsnap_id, snaps)) self.assertIsNone(model_update) - self.assertIsNotNone( - re.findall('id^12', - volume_updates[0]['provider_location'])) + provider_location = re.findall('id\^12', + volume_updates[0]['provider_location']) + self.assertEqual(1, len(provider_location)) @res_mock.patch_common_adapter def test_create_cloned_cg(self, common, _): @@ -270,9 +270,9 @@ class TestCommonAdapter(test_base.TestCase): model_update, volume_updates = vnx_common.do_clone_cg( cg_id, cg_host, volumes, src_cg_id, src_volumes) self.assertIsNone(model_update) - self.assertIsNotNone( - re.findall('id^12', - volume_updates[0]['provider_location'])) + provider_location = re.findall('id\^12', + volume_updates[0]['provider_location']) + self.assertEqual(1, len(provider_location)) @res_mock.patch_common_adapter def test_parse_pools(self, vnx_common, mocked):