diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 186c28c3..e6cba0f6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -172,8 +172,7 @@ jobs: set -x export CLICKHOUSE_TESTS_DIR=$(pwd)/test/testflows/clickhouse_backup - command -v docker-compose || (apt-get update && apt-get install -y python3-pip && pip3 install -U docker-compose) - docker-compose -f ${CLICKHOUSE_TESTS_DIR}/docker-compose/docker-compose.yml pull + docker compose -f ${CLICKHOUSE_TESTS_DIR}/docker-compose/docker-compose.yml pull chmod +x $(pwd)/clickhouse-backup/clickhouse-backup* source ~/venv/qa/bin/activate diff --git a/test/integration/minio_nodelete.sh b/test/integration/minio_nodelete.sh index 369fba89..2180deab 100755 --- a/test/integration/minio_nodelete.sh +++ b/test/integration/minio_nodelete.sh @@ -30,5 +30,5 @@ EOF ) mc admin policy attach local nodelete --user nodelete -mc alias set nodelete http://localhost:9000 nodelete nodelete_password +mc alias set nodelete https://localhost:9000 nodelete nodelete_password mc alias list diff --git a/test/testflows/README.md b/test/testflows/README.md index 7a5bf203..9e83cdd4 100644 --- a/test/testflows/README.md +++ b/test/testflows/README.md @@ -9,7 +9,7 @@ To execute tests, you will need: * Python 3.8 or higher (`python3`) * The latest version of Go (`https://go.dev/doc/install`) * TestFlows Python library (`https://testflows.com/`) -* `docker` and `docker-compose` +* `docker` and `docker compose` To install all necessary Python packages, execute: ```bash diff --git a/test/testflows/clickhouse_backup/docker-compose/docker-compose.yml b/test/testflows/clickhouse_backup/docker-compose/docker-compose.yml index e2fed198..206a7407 100644 --- a/test/testflows/clickhouse_backup/docker-compose/docker-compose.yml +++ b/test/testflows/clickhouse_backup/docker-compose/docker-compose.yml @@ -229,7 +229,7 @@ services: start_period: 15s # dummy service which does nothing, but allows to postpone - # 'docker-compose up -d' till all dependencies will go healthy + # 'docker compose up -d' till all dependencies will go healthy all_services_ready: image: hello-world depends_on: diff --git a/test/testflows/clickhouse_backup/tests/other_engines.py b/test/testflows/clickhouse_backup/tests/other_engines.py index 946f4e4c..ecc95f31 100644 --- a/test/testflows/clickhouse_backup/tests/other_engines.py +++ b/test/testflows/clickhouse_backup/tests/other_engines.py @@ -177,7 +177,7 @@ def kafka_engine(self): assert f"{name_prefix}" in r, error() finally: - with Finally("I bring up docker-compose to restore all services"): + with Finally("I bring up docker compose to restore all services"): command = f'{cluster.docker_compose} up -d --no-recreate 2>&1 | tee' cluster.command(None, command) diff --git a/test/testflows/helpers/argparser.py b/test/testflows/helpers/argparser.py index b8bd1124..a272917b 100644 --- a/test/testflows/helpers/argparser.py +++ b/test/testflows/helpers/argparser.py @@ -3,4 +3,4 @@ def argparser(parser): """ parser.add_argument("--local", action="store_true", - help="run regression in local mode without docker-compose down", default=True) + help="run regression in local mode without docker compose down", default=True) diff --git a/test/testflows/helpers/cluster.py b/test/testflows/helpers/cluster.py index a3b1fdfc..0ac0fbc6 100644 --- a/test/testflows/helpers/cluster.py +++ b/test/testflows/helpers/cluster.py @@ -34,7 +34,7 @@ def __exit__(self, shell_type, shell_value, traceback): # to terminate any open shell commands. # This is needed for example # to solve a problem with - # 'docker-compose exec {name} bash --noediting' + # 'docker compose exec {name} bash --noediting' # that does not clean up open bash processes # if not exited normally for i in range(10): @@ -407,13 +407,13 @@ def query(self, sql, expect_message=None, exitcode=None, steps=True, no_checks=F class Cluster(object): - """Simple object around docker-compose cluster. + """Simple object around docker compose cluster. """ def __init__(self, local=False, configs_dir=None, nodes=None, - docker_compose="docker-compose", docker_compose_project_dir=None, + docker_compose="docker compose", docker_compose_project_dir=None, docker_compose_file="docker-compose.yml", environ=None): @@ -611,7 +611,7 @@ def close_bash(self, node): del self.shells[shell_id] def __enter__(self): - with Given("docker-compose cluster"): + with Given("docker compose cluster"): self.up() return self @@ -633,7 +633,7 @@ def node(self, node_name): return Node(self, node_name) def down(self, timeout=300): - """Bring cluster down by executing docker-compose down.""" + """Bring cluster down by executing docker compose down.""" # add message to each clickhouse-server.log if settings.debug: @@ -690,7 +690,7 @@ def up(self, timeout=120): with And("I list environment variables to show their values"): self.command(None, "env | grep CLICKHOUSE") - with Given("docker-compose"): + with Given("docker compose"): max_attempts = 5 max_up_attempts = 1 @@ -699,9 +699,9 @@ def up(self, timeout=120): with By("checking if any containers are already running"): self.command(None, f"{self.docker_compose} ps | tee") - with And("executing docker-compose down just in case it is up"): + with And("executing docker compose down just in case it is up"): cmd = self.command( - None, f"{self.docker_compose} down --timeout=10 2>&1 | tee", exitcode=None, timeout=timeout + None, f"{self.docker_compose} down --timeout=1 2>&1 | tee", exitcode=None, timeout=timeout ) if cmd.exitcode != 0: continue @@ -709,7 +709,7 @@ def up(self, timeout=120): with And("checking if any containers are still left running"): self.command(None, f"{self.docker_compose} ps | tee") - with And("executing docker-compose up"): + with And("executing docker compose up"): for up_attempt in range(max_up_attempts): with By(f"attempt {up_attempt}/{max_up_attempts}"): cmd = self.command( @@ -728,7 +728,7 @@ def up(self, timeout=120): break if cmd.exitcode != 0 or "is unhealthy" in cmd.output or "Exit" in ps_cmd.output: - fail("could not bring up docker-compose cluster") + fail("could not bring up docker compose cluster") with Then("wait all nodes report healthy"): for node_name in self.nodes["clickhouse"]: