From 1c5a531cc771f1b7ba1ec9e145a33cc204a81168 Mon Sep 17 00:00:00 2001 From: Chin-Ya Huang Date: Thu, 25 Jan 2024 08:42:48 +0800 Subject: [PATCH] refactor(integration): name the optional parameters in create_and_check_volume function call Signed-off-by: Chin-Ya Huang --- .../integration/tests/test_backing_image.py | 53 +++++++------- manager/integration/tests/test_basic.py | 73 +++++++++++++------ .../tests/test_cluster_autoscaler.py | 5 +- manager/integration/tests/test_ha.py | 44 +++++++---- manager/integration/tests/test_migration.py | 7 +- manager/integration/tests/test_orphan.py | 4 +- manager/integration/tests/test_scheduling.py | 3 +- manager/integration/tests/test_settings.py | 7 +- manager/integration/tests/test_snapshot.py | 17 +++-- manager/integration/tests/test_upgrade.py | 8 +- manager/integration/tests/test_zone.py | 3 +- 11 files changed, 137 insertions(+), 87 deletions(-) diff --git a/manager/integration/tests/test_backing_image.py b/manager/integration/tests/test_backing_image.py index 25fbdc34e4..5fac7c272b 100644 --- a/manager/integration/tests/test_backing_image.py +++ b/manager/integration/tests/test_backing_image.py @@ -77,9 +77,10 @@ def backing_image_basic_operation_test(client, volume_name, bi_name, bi_url): # 8. Delete the backing image. """ - volume = create_and_check_volume( - client, volume_name, 3, - str(BACKING_IMAGE_EXT4_SIZE), bi_name) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=3, + size=str(BACKING_IMAGE_EXT4_SIZE), + backing_image=bi_name) lht_host_id = get_self_host_id() volume.attach(hostId=lht_host_id) volume = wait_for_volume_healthy(client, volume_name) @@ -144,9 +145,10 @@ def backing_image_content_test(client, volume_name_prefix, bi_name, bi_url): # lht_host_id = get_self_host_id() volume_name1 = volume_name_prefix + "-1" - volume1 = create_and_check_volume( - client, volume_name1, 3, - str(BACKING_IMAGE_EXT4_SIZE), bi_name) + volume1 = create_and_check_volume(client, volume_name1, + num_of_replicas=3, + size=str(BACKING_IMAGE_EXT4_SIZE), + backing_image=bi_name) volume1.attach(hostId=lht_host_id) volume1 = wait_for_volume_healthy(client, volume_name1) assert volume1.backingImage == bi_name @@ -176,9 +178,10 @@ def backing_image_content_test(client, volume_name_prefix, bi_name, bi_url): # check_volume_data(volume1, data) volume_name2 = volume_name_prefix + "-2" - volume2 = create_and_check_volume( - client, volume_name2, 3, - str(BACKING_IMAGE_EXT4_SIZE), bi_name) + volume2 = create_and_check_volume(client, volume_name2, + num_of_replicas=3, + size=str(BACKING_IMAGE_EXT4_SIZE), + backing_image=bi_name) volume2.attach(hostId=lht_host_id) volume2 = wait_for_volume_healthy(client, volume_name2) assert volume1.backingImage == bi_name @@ -528,10 +531,10 @@ def test_backing_image_auto_resync(bi_url, client, volume_name): # NOQA client, BACKING_IMAGE_NAME, bi_url) # Step 2 - volume = create_and_check_volume( - client, volume_name, 3, - str(BACKING_IMAGE_EXT4_SIZE), - BACKING_IMAGE_NAME) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=3, + size=str(BACKING_IMAGE_EXT4_SIZE), + backing_image=BACKING_IMAGE_NAME) # Step 3 lht_host_id = get_self_host_id() @@ -585,13 +588,13 @@ def backing_image_cleanup(core_api, client): # NOQA # Step 2 lht_host_id = get_self_host_id() - volume1 = create_and_check_volume( - client, volume_name="vol-1", size=str(1 * Gi), - backing_image=backing_img1_name) + volume1 = create_and_check_volume(client, "vol-1", + size=str(1 * Gi), + backing_image=backing_img1_name) - volume2 = create_and_check_volume( - client, volume_name="vol-2", size=str(1 * Gi), - backing_image=backing_img2_name) + volume2 = create_and_check_volume(client, "vol-2", + size=str(1 * Gi), + backing_image=backing_img2_name) # Step 3 volume1.attach(hostId=lht_host_id) @@ -655,9 +658,9 @@ def test_volume_wait_for_backing_image_condition(client): # NOQA lht_host_id = get_self_host_id() volume1_name = "vol1" - volume1 = create_and_check_volume( - client, volume1_name, 3, - str(1 * Gi)) + volume1 = create_and_check_volume(client, volume1_name, + num_of_replicas=3, + size=str(1 * Gi)) volume1.attach(hostId=lht_host_id) volume1 = wait_for_volume_healthy(client, volume1_name) volume_endpoint = get_volume_endpoint(volume1) @@ -673,9 +676,9 @@ def test_volume_wait_for_backing_image_condition(client): # NOQA # Create volume with that backing image volume2_name = "vol2" - volume2 = create_and_check_volume( - client, volume_name=volume2_name, size=str(1 * Gi), - backing_image=backing_img["name"]) + volume2 = create_and_check_volume(client, volume2_name, + size=str(1 * Gi), + backing_image=backing_img["name"]) volume2.attach(hostId=lht_host_id) diff --git a/manager/integration/tests/test_basic.py b/manager/integration/tests/test_basic.py index 301bbcc2d6..bedd863e03 100644 --- a/manager/integration/tests/test_basic.py +++ b/manager/integration/tests/test_basic.py @@ -271,8 +271,10 @@ def volume_basic_test(client, volume_name, backing_image=""): # NOQA numberOfReplicas=2, frontend="invalid_frontend") - volume = create_and_check_volume(client, volume_name, num_replicas, SIZE, - backing_image) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=num_replicas, + size=SIZE, + backing_image=backing_image) assert volume.restoreRequired is False def validate_volume_basic(expected, actual): @@ -349,8 +351,11 @@ def test_volume_iscsi_basic(client, volume_name): # NOQA def volume_iscsi_basic_test(client, volume_name, backing_image=""): # NOQA host_id = get_self_host_id() - volume = create_and_check_volume(client, volume_name, 3, SIZE, - backing_image, VOLUME_FRONTEND_ISCSI) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=3, + size=SIZE, + backing_image=backing_image, + frontend=VOLUME_FRONTEND_ISCSI) volume.attach(hostId=host_id) volume = common.wait_for_volume_healthy(client, volume_name) @@ -559,8 +564,10 @@ def test_backup_status_for_unavailable_replicas(set_random_backupstore, client, def backup_status_for_unavailable_replicas_test(client, volume_name, # NOQA size, backing_image=""): # NOQA - volume = create_and_check_volume(client, volume_name, 2, str(size), - backing_image) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=2, + size=str(size), + backing_image=backing_image) lht_hostId = get_self_host_id() volume = volume.attach(hostId=lht_hostId) @@ -746,7 +753,9 @@ def test_dr_volume_activated_with_failed_replica(set_random_backupstore, client, backupstore_cleanup(client) host_id = get_self_host_id() - vol = create_and_check_volume(client, volume_name, 2, SIZE) + vol = create_and_check_volume(client, volume_name, + num_of_replicas=2, + size=SIZE) vol.attach(hostId=host_id) vol = common.wait_for_volume_healthy(client, volume_name) @@ -821,7 +830,9 @@ def test_dr_volume_with_backup_block_deletion(set_random_backupstore, client, co host_id = get_self_host_id() - vol = create_and_check_volume(client, volume_name, 2, SIZE) + vol = create_and_check_volume(client, volume_name, + num_of_replicas=2, + size=SIZE) vol.attach(hostId=host_id) vol = common.wait_for_volume_healthy(client, volume_name) @@ -918,7 +929,9 @@ def test_dr_volume_with_backup_block_deletion_abort_during_backup_in_progress(se host_id = get_self_host_id() - vol = create_and_check_volume(client, volume_name, 2, SIZE) + vol = create_and_check_volume(client, volume_name, + num_of_replicas=2, + size=SIZE) vol.attach(hostId=host_id) vol = common.wait_for_volume_healthy(client, volume_name) @@ -997,7 +1010,9 @@ def test_dr_volume_with_all_backup_blocks_deleted(set_random_backupstore, client host_id = get_self_host_id() - vol = create_and_check_volume(client, volume_name, 2, SIZE) + vol = create_and_check_volume(client, volume_name, + num_of_replicas=2, + size=SIZE) vol.attach(hostId=host_id) vol = common.wait_for_volume_healthy(client, volume_name) @@ -1322,8 +1337,10 @@ def test_backup(set_random_backupstore, client, volume_name): # NOQA def backup_test(client, volume_name, size, backing_image="", compression_method=DEFAULT_BACKUP_COMPRESSION_METHOD): # NOQA - volume = create_and_check_volume(client, volume_name, 2, size, - backing_image) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=2, + size=size, + backing_image=backing_image) lht_hostId = get_self_host_id() volume = volume.attach(hostId=lht_hostId) @@ -1382,8 +1399,10 @@ def test_backup_labels(set_random_backupstore, client, random_labels, volume_nam def backup_labels_test(client, random_labels, volume_name, size=SIZE, backing_image=""): # NOQA host_id = get_self_host_id() - volume = create_and_check_volume(client, volume_name, 2, size, - backing_image) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=2, + size=size, + backing_image=backing_image) volume.attach(hostId=host_id) volume = common.wait_for_volume_healthy(client, volume_name) @@ -1433,7 +1452,9 @@ def test_restore_inc(set_random_backupstore, client, core_api, volume_name, pod) def restore_inc_test(client, core_api, volume_name, pod): # NOQA - std_volume = create_and_check_volume(client, volume_name, 2, SIZE) + std_volume = create_and_check_volume(client, volume_name, + num_of_replicas=2, + size=SIZE) lht_host_id = get_self_host_id() std_volume.attach(hostId=lht_host_id) std_volume = common.wait_for_volume_healthy(client, volume_name) @@ -2077,7 +2098,8 @@ def test_volume_update_replica_count(client, volume_name): # NOQA host_id = get_self_host_id() replica_count = 2 - volume = create_and_check_volume(client, volume_name, replica_count) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=replica_count) volume.attach(hostId=host_id) volume = common.wait_for_volume_healthy(client, volume_name) @@ -2182,11 +2204,8 @@ def test_storage_class_from_backup(set_random_backupstore, volume_name, pvc_name pv_name = pvc_name - volume = create_and_check_volume( - client, - volume_name, - size=VOLUME_SIZE - ) + volume = create_and_check_volume(client, volume_name, + size=VOLUME_SIZE) wait_for_volume_detached(client, volume_name) @@ -2404,7 +2423,9 @@ def test_expansion_with_size_round_up(client, core_api, volume_name): # NOQA 5. Check if size round up '2147483648' and the written data. """ - volume = create_and_check_volume(client, volume_name, 2, str(1 * Gi)) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=2, + size=str(1 * Gi)) self_hostId = get_self_host_id() volume.attach(hostId=self_hostId, disableFrontend=False) @@ -2466,7 +2487,9 @@ def test_restore_inc_with_offline_expansion(set_random_backupstore, client, core """ lht_host_id = get_self_host_id() - std_volume = create_and_check_volume(client, volume_name, 2, SIZE) + std_volume = create_and_check_volume(client, volume_name, + num_of_replicas=2, + size=SIZE) std_volume.attach(hostId=lht_host_id) std_volume = common.wait_for_volume_healthy(client, volume_name) @@ -4194,7 +4217,9 @@ def test_expand_pvc_with_size_round_up(client, core_api, volume_name): # NOQA setting = client.update(setting, value=static_sc_name) assert setting.value == static_sc_name - volume = create_and_check_volume(client, volume_name, 2, str(1 * Gi)) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=2, + size=str(1 * Gi)) create_pv_for_volume(client, core_api, volume, volume_name) create_pvc_for_volume(client, core_api, volume, volume_name) diff --git a/manager/integration/tests/test_cluster_autoscaler.py b/manager/integration/tests/test_cluster_autoscaler.py index 1404719701..6a103674c0 100644 --- a/manager/integration/tests/test_cluster_autoscaler.py +++ b/manager/integration/tests/test_cluster_autoscaler.py @@ -147,9 +147,8 @@ def finalizer(): nodes = client.list_node() scale_size = len(nodes)-1 - volume = create_and_check_volume( - client, volume_name, num_of_replicas=scale_size - ) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=scale_size) create_pv_for_volume(client, core_api, volume, volume.name) create_pvc_for_volume(client, core_api, volume, volume.name) diff --git a/manager/integration/tests/test_ha.py b/manager/integration/tests/test_ha.py index 032c479cc1..d62064b695 100644 --- a/manager/integration/tests/test_ha.py +++ b/manager/integration/tests/test_ha.py @@ -113,8 +113,10 @@ def test_ha_simple_recovery(client, volume_name): # NOQA def ha_simple_recovery_test(client, volume_name, size, backing_image=""): # NOQA - volume = create_and_check_volume(client, volume_name, 2, size, - backing_image) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=2, + size=size, + backing_image=backing_image) host_id = get_self_host_id() volume = volume.attach(hostId=host_id) @@ -248,7 +250,8 @@ def ha_salvage_test(client, core_api, # NOQA assert setting.name == SETTING_AUTO_SALVAGE assert setting.value == "false" - volume = create_and_check_volume(client, volume_name, 2, + volume = create_and_check_volume(client, volume_name, + num_of_replicas=2, backing_image=backing_image) host_id = get_self_host_id() @@ -291,7 +294,8 @@ def ha_salvage_test(client, core_api, # NOQA assert setting.name == SETTING_AUTO_SALVAGE assert setting.value == "false" - volume = create_and_check_volume(client, volume_name, 2, + volume = create_and_check_volume(client, volume_name, + num_of_replicas=2, backing_image=backing_image) volume.attach(hostId=host_id) volume = wait_for_volume_healthy(client, volume_name) @@ -339,7 +343,8 @@ def ha_salvage_test(client, core_api, # NOQA assert setting.name == SETTING_DISABLE_REVISION_COUNTER assert setting.value == "true" - volume = create_and_check_volume(client, volume_name, 3, + volume = create_and_check_volume(client, volume_name, + num_of_replicas=3, backing_image=backing_image) host_id = get_self_host_id() @@ -383,7 +388,8 @@ def ha_salvage_test(client, core_api, # NOQA assert setting.name == "disable-revision-counter" assert setting.value == "false" - volume = create_and_check_volume(client, volume_name, 3, + volume = create_and_check_volume(client, volume_name, + num_of_replicas=3, backing_image=backing_image) host_id = get_self_host_id() @@ -507,7 +513,8 @@ def test_ha_prohibit_deleting_last_replica(client, volume_name): # NOQA FIXME: Move out of test_ha.py """ - volume = create_and_check_volume(client, volume_name, 1) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=1) host_id = get_self_host_id() volume = volume.attach(hostId=host_id) @@ -539,7 +546,9 @@ def test_ha_recovery_with_expansion(client, volume_name, request): # NOQA """ original_size = str(3 * Gi) expand_size = str(4 * Gi) - volume = create_and_check_volume(client, volume_name, 2, original_size) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=2, + size=original_size) host_id = get_self_host_id() volume.attach(hostId=host_id) @@ -1881,7 +1890,8 @@ def test_rebuild_after_replica_file_crash(client, volume_name): # NOQA 6. Read the data from the volume and verify the md5sum. """ replica_count = 3 - volume = create_and_check_volume(client, volume_name, replica_count) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=replica_count) host_id = get_self_host_id() volume = volume.attach(hostId=host_id) volume = wait_for_volume_healthy(client, volume_name) @@ -2488,7 +2498,9 @@ def test_replica_failure_during_attaching(settings_reset, client, core_api, volu node = common.wait_for_disk_update(client, node.name, len(update_disks)) volume_name_2 = volume_name + '-2' - volume_2 = create_and_check_volume(client, volume_name_2, 3, str(1 * Gi)) + volume_2 = create_and_check_volume(client, volume_name_2, + num_of_replicas=3, + size=str(1 * Gi)) volume_2.attach(hostId=host_id) volume_2 = wait_for_volume_healthy(client, volume_name_2) write_volume_random_data(volume_2) @@ -2847,7 +2859,8 @@ def test_engine_image_not_fully_deployed_perform_replica_scheduling(client, core node2 = common.wait_for_node_update(client, node2.id, "allowScheduling", False) - volume1 = create_and_check_volume(client, "vol-1", num_of_replicas=2, + volume1 = create_and_check_volume(client, "vol-1", + num_of_replicas=2, size=str(3 * Gi)) volume1.attach(hostId=node3.id) @@ -2894,10 +2907,12 @@ def test_engine_image_not_fully_deployed_perform_auto_upgrade_engine(client, cor """ prepare_engine_not_fully_deployed_environment(client, core_api) - volume1 = create_and_check_volume(client, "vol-1", num_of_replicas=2, + volume1 = create_and_check_volume(client, "vol-1", + num_of_replicas=2, size=str(3 * Gi)) - volume2 = create_and_check_volume(client, "vol-2", num_of_replicas=2, + volume2 = create_and_check_volume(client, "vol-2", + num_of_replicas=2, size=str(3 * Gi)) default_img = common.get_default_engine_image(client) @@ -2971,7 +2986,8 @@ def test_engine_image_not_fully_deployed_perform_dr_restoring_expanding_volume(c prepare_engine_not_fully_deployed_environment(client, core_api) # step 1 - volume1 = create_and_check_volume(client, "vol-1", num_of_replicas=2, + volume1 = create_and_check_volume(client, "vol-1", + num_of_replicas=2, size=str(1 * Gi)) # node1: tainted node, node2: self host node, node3: the last one diff --git a/manager/integration/tests/test_migration.py b/manager/integration/tests/test_migration.py index d8dced2a0e..cea8ab15e9 100644 --- a/manager/integration/tests/test_migration.py +++ b/manager/integration/tests/test_migration.py @@ -404,10 +404,9 @@ def test_migration_with_restore_volume(core_api, # NOQA """ # Step 1 lht_host_id = get_self_host_id() - volume = create_and_check_volume(client, - volume_name, - REPLICA_COUNT, - SIZE) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=REPLICA_COUNT, + size=SIZE) attachment_id = common.generate_attachment_ticket_id() volume.attach(attachmentID=attachment_id, hostId=lht_host_id) diff --git a/manager/integration/tests/test_orphan.py b/manager/integration/tests/test_orphan.py index 8252996d95..9a951b990e 100644 --- a/manager/integration/tests/test_orphan.py +++ b/manager/integration/tests/test_orphan.py @@ -61,7 +61,9 @@ def create_volume_with_replica_on_host(client, volume_name): # NOQA nodes = client.list_node() - volume = create_and_check_volume(client, volume_name, len(nodes), SIZE) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=len(nodes), + size=SIZE) volume.attach(hostId=lht_hostId, disableFrontend=False) wait_for_volume_healthy(client, volume_name) diff --git a/manager/integration/tests/test_scheduling.py b/manager/integration/tests/test_scheduling.py index 4cde8e212c..e25af96235 100644 --- a/manager/integration/tests/test_scheduling.py +++ b/manager/integration/tests/test_scheduling.py @@ -1082,8 +1082,7 @@ def test_data_locality_basic(client, core_api, volume_name, pod, settings_reset) pod1['metadata']['name'] = pod1_name - volume1 = create_and_check_volume(client, - volume1_name, + volume1 = create_and_check_volume(client, volume1_name, num_of_replicas=1, size=volume1_size) diff --git a/manager/integration/tests/test_settings.py b/manager/integration/tests/test_settings.py index b4ae7282b5..b97b36b792 100644 --- a/manager/integration/tests/test_settings.py +++ b/manager/integration/tests/test_settings.py @@ -648,9 +648,10 @@ def test_setting_backing_image_auto_cleanup(client, core_api, volume_name): # N ] for volume_name in volume_names: - create_and_check_volume( - client, volume_name, 3, str(BACKING_IMAGE_EXT4_SIZE), - BACKING_IMAGE_NAME) + create_and_check_volume(client, volume_name, + num_of_replicas=3, + size=str(BACKING_IMAGE_EXT4_SIZE), + backing_image=BACKING_IMAGE_NAME) # Step 4 lht_host_id = get_self_host_id() diff --git a/manager/integration/tests/test_snapshot.py b/manager/integration/tests/test_snapshot.py index 4d4a70edb5..da8c7dc8ce 100644 --- a/manager/integration/tests/test_snapshot.py +++ b/manager/integration/tests/test_snapshot.py @@ -321,7 +321,9 @@ def detect_and_repair_corrupted_replica(client, volume_name, data_integrity_mode """ # Step 1 - volume = create_and_check_volume(client, volume_name, 3, size=str(2 * Gi)) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=3, + size=str(2 * Gi)) lht_hostId = get_self_host_id() volume = volume.attach(hostId=lht_hostId) @@ -572,7 +574,8 @@ def check_hashed_and_with_immediate_hash(client, volume_name, snapshot_data_inte """ # Step 1 - volume = create_and_check_volume(client, volume_name, 3, + volume = create_and_check_volume(client, volume_name, + num_of_replicas=3, size=str(volume_size * Mi), snapshot_data_integrity=snapshot_data_integrity) # NOQA @@ -604,7 +607,8 @@ def check_hashed_and_without_immediate_hash(client, volume_name, snapshot_data_i """ # Step 1 - volume = create_and_check_volume(client, volume_name, 3, + volume = create_and_check_volume(client, volume_name, + num_of_replicas=3, size=str(16 * Mi), snapshot_data_integrity=snapshot_data_integrity) # NOQA @@ -644,7 +648,8 @@ def check_per_volume_hash_disable(client, volume_name, snapshot_data_integrity): """ # Step 1 - volume = create_and_check_volume(client, volume_name, 3, + volume = create_and_check_volume(client, volume_name, + num_of_replicas=3, size=str(16 * Mi), snapshot_data_integrity=snapshot_data_integrity) # NOQA @@ -694,7 +699,9 @@ def test_snapshot_cr(client, volume_name, settings_reset): # NOQA client.update(setting, value="true") lht_hostId = get_self_host_id() - volume = create_and_check_volume(client, volume_name, 3, size=str(1 * Gi)) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=3, + size=str(1 * Gi)) volume = volume.attach(hostId=lht_hostId) wait_for_volume_healthy(client, volume_name) volume = client.by_id_volume(volume_name) diff --git a/manager/integration/tests/test_upgrade.py b/manager/integration/tests/test_upgrade.py index 97b77d959d..249af8caf5 100644 --- a/manager/integration/tests/test_upgrade.py +++ b/manager/integration/tests/test_upgrade.py @@ -349,11 +349,9 @@ def test_upgrade(longhorn_upgrade_type, set_backupstore_nfs(client) mount_nfs_backupstore(client) backup_vol_name = "backup-vol" - backup_vol = create_and_check_volume( - client, - backup_vol_name, - 2, - str(DEFAULT_VOLUME_SIZE * Gi)) + backup_vol = create_and_check_volume(client, backup_vol_name, + num_of_replicas=2, + size=str(DEFAULT_VOLUME_SIZE * Gi)) backup_vol.attach(hostId=host_id) backup_vol = wait_for_volume_healthy(client, backup_vol_name) data0 = {'pos': 0, 'len': BACKUP_BLOCK_SIZE, diff --git a/manager/integration/tests/test_zone.py b/manager/integration/tests/test_zone.py index 6fa725d9cb..88272fe88b 100644 --- a/manager/integration/tests/test_zone.py +++ b/manager/integration/tests/test_zone.py @@ -145,7 +145,8 @@ def test_zone_tags(client, core_api, volume_name, k8s_node_zone_tags): # NOQA wait_longhorn_node_zone_updated(client) - volume = create_and_check_volume(client, volume_name, num_of_replicas=2) + volume = create_and_check_volume(client, volume_name, + num_of_replicas=2) host_id = get_self_host_id()