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 3fdbac63ba8..7f6092a58a1 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 @@ -351,7 +351,7 @@ test_migrate_lun_error: test_verify_migration: lun1: &src_lun - _propertis: + _properties: <<: *lun_base_prop lun2: &dst_lun _properties: @@ -1636,10 +1636,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: @@ -1648,7 +1651,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 @@ -1661,7 +1665,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 5a4e2a12579..7bde14bcf07 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 @@ -221,9 +221,9 @@ class TestCommonAdapter(test.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, _): @@ -280,9 +280,9 @@ class TestCommonAdapter(test.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):