From c947484fe0d788dd46384b90987b59694f0a0b77 Mon Sep 17 00:00:00 2001 From: kssenii Date: Tue, 12 Mar 2024 19:36:10 +0100 Subject: [PATCH] Fxi again --- tests/integration/test_disk_types/test.py | 15 ++++++++++++--- .../test_endpoint_macro_substitution/test.py | 17 ++++++++++++----- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/tests/integration/test_disk_types/test.py b/tests/integration/test_disk_types/test.py index a53d073d30b..b9b8ef2010d 100644 --- a/tests/integration/test_disk_types/test.py +++ b/tests/integration/test_disk_types/test.py @@ -87,19 +87,28 @@ def test_different_types(cluster): def test_select_by_type(cluster): node = cluster.instances["node"] for name, disk_type in list(disk_types.items()): - if disk_type != "S3": + if disk_type == "Local": assert ( node.query( "SELECT name FROM system.disks WHERE type='" + disk_type + "'" ) == name + "\n" ) - else: + elif disk_type == "S3": assert ( node.query( - "SELECT name FROM system.disks WHERE type='" + "SELECT name FROM system.disks WHERE object_storage_type='" + disk_type + "' ORDER BY name" ) == "disk_encrypted\ndisk_s3\n" ) + else: + assert ( + node.query( + "SELECT name FROM system.disks WHERE object_storage_type='" + + disk_type + + "'" + ) + == name + "\n" + ) diff --git a/tests/integration/test_endpoint_macro_substitution/test.py b/tests/integration/test_endpoint_macro_substitution/test.py index e161d8e82ff..ee72fb9b492 100644 --- a/tests/integration/test_endpoint_macro_substitution/test.py +++ b/tests/integration/test_endpoint_macro_substitution/test.py @@ -67,22 +67,29 @@ def test_different_types(cluster): def test_select_by_type(cluster): node = cluster.instances["node"] - fs = HdfsClient(hosts=cluster.hdfs_ip) - for name, disk_type in list(disk_types.items()): - if disk_type != "S3": + if disk_type == "Local": assert ( node.query( "SELECT name FROM system.disks WHERE type='" + disk_type + "'" ) == name + "\n" ) - else: + elif disk_type == "S3": assert ( node.query( - "SELECT name FROM system.disks WHERE type='" + "SELECT name FROM system.disks WHERE object_storage_type='" + disk_type + "' ORDER BY name" ) == "disk_encrypted\ndisk_s3\n" ) + else: + assert ( + node.query( + "SELECT name FROM system.disks WHERE object_storage_type='" + + disk_type + + "'" + ) + == name + "\n" + )