From 2c76f7ea9ac265ba9dcd2684074fc99dd7b2b0cb Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 29 Mar 2022 23:07:46 +0300 Subject: t/i/docker: reuse the root docker-compose.yml --- test/integration/docker/client/etc/cgitize.toml | 2 +- test/integration/docker/docker-compose.yml | 15 ++++++++------- test/integration/docker/test.sh | 14 +++++++------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/test/integration/docker/client/etc/cgitize.toml b/test/integration/docker/client/etc/cgitize.toml index 4e8fda7..f20ba77 100644 --- a/test/integration/docker/client/etc/cgitize.toml +++ b/test/integration/docker/client/etc/cgitize.toml @@ -1,4 +1,4 @@ [repositories.test_repo] name = "test_repo" -clone_url = "root@server:~/test_repo" +clone_url = "root@git_server:~/test_repo" diff --git a/test/integration/docker/docker-compose.yml b/test/integration/docker/docker-compose.yml index 2ac7dee..b5560e2 100644 --- a/test/integration/docker/docker-compose.yml +++ b/test/integration/docker/docker-compose.yml @@ -1,15 +1,16 @@ version: '3' services: - server: + git_server: build: context: . dockerfile: server/Dockerfile - image: server - client: - build: - context: ../../.. - dockerfile: Dockerfile - image: client + image: git_server + backend: + extends: + file: ../../../docker-compose.yml + service: backend + environment: + SCHEDULE: once volumes: - ./client/etc/:/etc/cgitize:ro - "$SSH_AUTH_SOCK:/ssh-agent.sock" diff --git a/test/integration/docker/test.sh b/test/integration/docker/test.sh index 4f24cf6..e55841f 100755 --- a/test/integration/docker/test.sh +++ b/test/integration/docker/test.sh @@ -128,16 +128,16 @@ setup() { docker_build } -run_server() { +run_git_server() { echo echo ---------------------------------------------------------------------- - echo Running the server + echo Running the Git server echo ---------------------------------------------------------------------- - docker-compose up -d server + docker-compose up -d git_server } -run_client() { +run_cgitize() { echo echo ---------------------------------------------------------------------- echo Running the client @@ -148,12 +148,12 @@ run_client() { return 1 fi dump "SSH_AUTH_SOCK: $SSH_AUTH_SOCK" - docker-compose run --rm client + docker-compose run --rm backend } run() { - run_server - run_client + run_git_server + run_cgitize } verify() { -- cgit v1.2.3