From 8ac07a4ebc19f3d5a9bb97b3963e696a1c523328 Mon Sep 17 00:00:00 2001 From: Tilman Moeller Date: Mon, 11 Nov 2024 12:00:21 +0100 Subject: [PATCH] astacus: test azure blob storage table engine --- astacus/coordinator/plugins/clickhouse/engines.py | 1 + .../coordinator/plugins/clickhouse/test_plugin.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/astacus/coordinator/plugins/clickhouse/engines.py b/astacus/coordinator/plugins/clickhouse/engines.py index 6b546a12..5a84d93d 100644 --- a/astacus/coordinator/plugins/clickhouse/engines.py +++ b/astacus/coordinator/plugins/clickhouse/engines.py @@ -11,3 +11,4 @@ class TableEngine(enum.Enum): PostgreSQL = "PostgreSQL" S3 = "S3" KeeperMap = "KeeperMap" + AzureBlobStorage = "AzureBlobStorage" diff --git a/tests/integration/coordinator/plugins/clickhouse/test_plugin.py b/tests/integration/coordinator/plugins/clickhouse/test_plugin.py index 9341621d..a8147f2c 100644 --- a/tests/integration/coordinator/plugins/clickhouse/test_plugin.py +++ b/tests/integration/coordinator/plugins/clickhouse/test_plugin.py @@ -251,6 +251,12 @@ async def setup_cluster_content(clients: Sequence[HttpClickHouseClient], clickho ) if await is_engine_available(clients[0], TableEngine.S3): await clients[0].execute(b"CREATE TABLE default.s3 (a Int) ENGINE = S3('http://bucket.s3.amazonaws.com/key.json')") + + if await is_engine_available(clients[0], TableEngine.AzureBlobStorage): + await clients[0].execute( + b"CREATE TABLE default.azureblobstorage (a Int) ENGINE = AzureBlobStorage('DefaultEndpointsProtocol=', 'test_container', 'test_table', 'CSV')" + ) + # add a function table await clients[0].execute(b"CREATE TABLE default.from_function_table AS numbers(3)") # add a table with data in object storage @@ -578,6 +584,7 @@ async def test_cleanup_does_not_break_object_storage_disk_files( ("default.postgresql", TableEngine.PostgreSQL), ("default.mysql", TableEngine.MySQL), ("default.s3", TableEngine.S3), + ("default.azureblobstorage", TableEngine.AzureBlobStorage), ], ) async def test_restores_integration_tables(