Fxi again

This commit is contained in:
kssenii 2024-03-12 19:36:10 +01:00
parent 4ce5245157
commit c947484fe0
2 changed files with 24 additions and 8 deletions

View File

@ -87,19 +87,28 @@ def test_different_types(cluster):
def test_select_by_type(cluster): def test_select_by_type(cluster):
node = cluster.instances["node"] node = cluster.instances["node"]
for name, disk_type in list(disk_types.items()): for name, disk_type in list(disk_types.items()):
if disk_type != "S3": if disk_type == "Local":
assert ( assert (
node.query( node.query(
"SELECT name FROM system.disks WHERE type='" + disk_type + "'" "SELECT name FROM system.disks WHERE type='" + disk_type + "'"
) )
== name + "\n" == name + "\n"
) )
else: elif disk_type == "S3":
assert ( assert (
node.query( node.query(
"SELECT name FROM system.disks WHERE type='" "SELECT name FROM system.disks WHERE object_storage_type='"
+ disk_type + disk_type
+ "' ORDER BY name" + "' ORDER BY name"
) )
== "disk_encrypted\ndisk_s3\n" == "disk_encrypted\ndisk_s3\n"
) )
else:
assert (
node.query(
"SELECT name FROM system.disks WHERE object_storage_type='"
+ disk_type
+ "'"
)
== name + "\n"
)

View File

@ -67,22 +67,29 @@ def test_different_types(cluster):
def test_select_by_type(cluster): def test_select_by_type(cluster):
node = cluster.instances["node"] node = cluster.instances["node"]
fs = HdfsClient(hosts=cluster.hdfs_ip)
for name, disk_type in list(disk_types.items()): for name, disk_type in list(disk_types.items()):
if disk_type != "S3": if disk_type == "Local":
assert ( assert (
node.query( node.query(
"SELECT name FROM system.disks WHERE type='" + disk_type + "'" "SELECT name FROM system.disks WHERE type='" + disk_type + "'"
) )
== name + "\n" == name + "\n"
) )
else: elif disk_type == "S3":
assert ( assert (
node.query( node.query(
"SELECT name FROM system.disks WHERE type='" "SELECT name FROM system.disks WHERE object_storage_type='"
+ disk_type + disk_type
+ "' ORDER BY name" + "' ORDER BY name"
) )
== "disk_encrypted\ndisk_s3\n" == "disk_encrypted\ndisk_s3\n"
) )
else:
assert (
node.query(
"SELECT name FROM system.disks WHERE object_storage_type='"
+ disk_type
+ "'"
)
== name + "\n"
)