mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Add the test for clickhouse_backupview to CI.
This commit is contained in:
parent
a4d57fe108
commit
21a283049c
@ -68,6 +68,7 @@ RUN python3 -m pip install --no-cache-dir \
|
||||
asyncio \
|
||||
avro==1.10.2 \
|
||||
azure-storage-blob \
|
||||
boto3 \
|
||||
cassandra-driver \
|
||||
confluent-kafka==1.9.2 \
|
||||
delta-spark==2.3.0 \
|
||||
|
@ -428,6 +428,7 @@ if __name__ == "__main__":
|
||||
f"--volume={args.library_bridge_binary}:/clickhouse-library-bridge "
|
||||
f"--volume={args.base_configs_dir}:/clickhouse-config "
|
||||
f"--volume={args.cases_dir}:/ClickHouse/tests/integration "
|
||||
f"--volume={args.utils_dir}/backupview:/ClickHouse/utils/backupview "
|
||||
f"--volume={args.utils_dir}/grpc-client/pb2:/ClickHouse/utils/grpc-client/pb2 "
|
||||
f"--volume=/run:/run/host:ro {dockerd_internal_volume} {env_tags} {env_cleanup} "
|
||||
f"-e DOCKER_CLIENT_TIMEOUT=300 -e COMPOSE_HTTP_TIMEOUT=600 {use_analyzer} -e PYTHONUNBUFFERED=1 "
|
||||
|
@ -4,11 +4,14 @@ import glob
|
||||
import re
|
||||
import random
|
||||
import os.path
|
||||
import sys
|
||||
from collections import namedtuple
|
||||
from helpers.cluster import ClickHouseCluster
|
||||
from helpers.test_tools import assert_eq_with_retry, TSV
|
||||
|
||||
|
||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
cluster = ClickHouseCluster(__file__)
|
||||
instance = cluster.add_instance(
|
||||
"instance",
|
||||
@ -1559,3 +1562,19 @@ def test_tables_dependency():
|
||||
)
|
||||
|
||||
drop()
|
||||
|
||||
|
||||
# Test for the "clickhouse_backupview" utility.
|
||||
|
||||
test_backupview_dir = os.path.abspath(
|
||||
os.path.join(script_dir, "../../../utils/backupview/test")
|
||||
)
|
||||
if test_backupview_dir not in sys.path:
|
||||
sys.path.append(test_backupview_dir)
|
||||
import test_backupview as test_backupview_module
|
||||
|
||||
|
||||
def test_backupview():
|
||||
if instance.is_built_with_sanitizer():
|
||||
return # This test is actually for clickhouse_backupview, not for ClickHouse itself.
|
||||
test_backupview_module.test_backupview_1()
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Tests for the clickhouse_backupview utility.
|
||||
# Use pytest ./test.py to run.
|
||||
# Use pytest ./test_backupview.py to run.
|
||||
|
||||
import pytest
|
||||
|
||||
@ -36,7 +36,7 @@ def calculate_total_size(dir):
|
||||
# Actual tests
|
||||
|
||||
|
||||
def test_backup_1():
|
||||
def test_backupview_1():
|
||||
with open_backup(os.path.join(script_dir, "test_backup_1.zip")) as b:
|
||||
assert b.get_subdirs("/") == ["shards"]
|
||||
assert b.dir_exists("/shards")
|
Loading…
Reference in New Issue
Block a user