2020-04-29 08:39:00 +00:00
|
|
|
import logging
|
2020-05-08 10:53:12 +00:00
|
|
|
import os
|
2020-09-25 16:15:34 +00:00
|
|
|
import time
|
2020-04-29 08:39:00 +00:00
|
|
|
|
|
|
|
import pytest
|
2024-09-27 10:19:39 +00:00
|
|
|
|
2023-08-24 13:07:26 +00:00
|
|
|
import helpers.s3_url_proxy_tests_util as proxy_util
|
2024-09-27 10:19:39 +00:00
|
|
|
from helpers.cluster import ClickHouseCluster
|
2020-05-08 10:53:12 +00:00
|
|
|
|
|
|
|
|
2020-04-29 08:39:00 +00:00
|
|
|
@pytest.fixture(scope="module")
|
|
|
|
def cluster():
|
|
|
|
try:
|
|
|
|
cluster = ClickHouseCluster(__file__)
|
2020-09-16 04:26:10 +00:00
|
|
|
cluster.add_instance(
|
2021-06-29 13:01:15 +00:00
|
|
|
"node", main_configs=["configs/config.d/storage_conf.xml"], with_minio=True
|
2020-09-16 04:26:10 +00:00
|
|
|
)
|
2020-04-29 08:39:00 +00:00
|
|
|
logging.info("Starting cluster...")
|
|
|
|
cluster.start()
|
|
|
|
logging.info("Cluster started")
|
|
|
|
|
2023-08-24 13:07:26 +00:00
|
|
|
proxy_util.run_resolver(cluster, os.path.dirname(__file__))
|
2020-05-08 10:53:12 +00:00
|
|
|
logging.info("Proxy resolver started")
|
|
|
|
|
2020-04-29 08:39:00 +00:00
|
|
|
yield cluster
|
|
|
|
finally:
|
|
|
|
cluster.shutdown()
|
|
|
|
|
|
|
|
|
2020-05-08 10:53:12 +00:00
|
|
|
@pytest.mark.parametrize("policy", ["s3", "s3_with_resolver"])
|
|
|
|
def test_s3_with_proxy_list(cluster, policy):
|
2024-05-30 14:14:56 +00:00
|
|
|
proxy_util.simple_storage_test(
|
|
|
|
cluster, cluster.instances["node"], ["proxy1", "proxy2"], policy
|
|
|
|
)
|