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
|
|
|
|
from helpers.cluster import ClickHouseCluster
|
2023-08-24 13:07:26 +00:00
|
|
|
import helpers.s3_url_proxy_tests_util as proxy_util
|
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__)
|
2022-03-22 16:39:58 +00:00
|
|
|
cluster.add_instance(
|
|
|
|
"node", main_configs=["configs/config.d/storage_conf.xml"], with_minio=True
|
|
|
|
)
|
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()
|
|
|
|
|
|
|
|
|
2022-03-22 16:39:58 +00:00
|
|
|
@pytest.mark.parametrize("policy", ["s3", "s3_with_resolver"])
|
2020-05-08 10:53:12 +00:00
|
|
|
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
|
|
|
|
)
|