[VNX] Fix test case issue
Major changes: 1. Fix mock file issue 2. Fix cg test case issue Change-Id: Ia95936f3cea611f9fb7517d3b6849f511be2450b Closes-bug: #1795957
This commit is contained in:
parent
0bc7bd7435
commit
18fbbd1afe
@ -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
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user