aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-03-29 23:07:46 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2022-03-29 23:07:46 +0300
commit2c76f7ea9ac265ba9dcd2684074fc99dd7b2b0cb (patch)
tree4c84385c7bd3eeeeadc3cbdc3ef1489080e87418
parentdocker: change default paths (diff)
downloadcgitize-2c76f7ea9ac265ba9dcd2684074fc99dd7b2b0cb.tar.gz
cgitize-2c76f7ea9ac265ba9dcd2684074fc99dd7b2b0cb.zip
t/i/docker: reuse the root docker-compose.yml
-rw-r--r--test/integration/docker/client/etc/cgitize.toml2
-rw-r--r--test/integration/docker/docker-compose.yml15
-rwxr-xr-xtest/integration/docker/test.sh14
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() {