4646)
4747from ..disks .сonsistency_groups .create_consistency_group import create_consistency_group
4848from ..disks .сonsistency_groups .delete_consistency_group import delete_consistency_group
49- from ..disks .сonsistency_groups .remove_disk_consistency_group import remove_disk_consistency_group
49+ from ..disks .сonsistency_groups .remove_disk_consistency_group import (
50+ remove_disk_consistency_group ,
51+ )
5052from ..images .get import get_image_from_family
5153from ..instances .create import create_instance , disk_from_image
5254from ..instances .delete import delete_instance
@@ -514,14 +516,16 @@ def test_clone_disks_in_consistency_group(
514516 autodelete_regional_disk_name ,
515517 autodelete_regional_blank_disk ,
516518):
517- first = "first-group" + uuid .uuid4 ().hex [:5 ]
518- create_consistency_group (PROJECT , REGION , first , "description" )
519+ group_name1 = "first-group" + uuid .uuid4 ().hex [:5 ]
520+ group_name2 = "second-group" + uuid .uuid4 ().hex [:5 ]
521+ create_consistency_group (PROJECT , REGION , group_name1 , "description" )
522+ create_consistency_group (PROJECT , REGION_SECONDARY , group_name2 , "description" )
519523
520524 add_disk_consistency_group (
521525 project_id = PROJECT ,
522526 disk_name = autodelete_regional_blank_disk .name ,
523527 disk_location = REGION ,
524- consistency_group_name = first ,
528+ consistency_group_name = group_name1 ,
525529 consistency_group_region = REGION ,
526530 )
527531
@@ -535,14 +539,11 @@ def test_clone_disks_in_consistency_group(
535539 DISK_SIZE ,
536540 )
537541
538- second = "second-group" + uuid .uuid4 ().hex [:5 ]
539- create_consistency_group (PROJECT , REGION_SECONDARY , second , "description" )
540-
541542 add_disk_consistency_group (
542543 project_id = PROJECT ,
543544 disk_name = second_disk .name ,
544545 disk_location = REGION_SECONDARY ,
545- consistency_group_name = second ,
546+ consistency_group_name = group_name2 ,
546547 consistency_group_region = REGION_SECONDARY ,
547548 )
548549
@@ -555,7 +556,7 @@ def test_clone_disks_in_consistency_group(
555556 )
556557 time .sleep (60 )
557558 try :
558- assert clone_disks_to_consistency_group (PROJECT , second , REGION_SECONDARY )
559+ assert clone_disks_to_consistency_group (PROJECT , REGION_SECONDARY , group_name2 )
559560 finally :
560561 stop_disk_replication (
561562 project_id = PROJECT ,
@@ -571,6 +572,8 @@ def test_clone_disks_in_consistency_group(
571572 for disk in disks :
572573 delete_regional_disk (PROJECT , REGION_SECONDARY , disk .name )
573574 time .sleep (25 )
574- remove_disk_consistency_group (PROJECT , autodelete_regional_blank_disk .name , REGION , first , REGION )
575- delete_consistency_group (PROJECT , REGION , first )
576- delete_consistency_group (PROJECT , REGION_SECONDARY , second )
575+ remove_disk_consistency_group (
576+ PROJECT , autodelete_regional_blank_disk .name , REGION , group_name1 , REGION
577+ )
578+ delete_consistency_group (PROJECT , REGION , group_name1 )
579+ delete_consistency_group (PROJECT , REGION_SECONDARY , group_name2 )
0 commit comments