aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-03-29 23:18:04 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2022-03-29 23:18:04 +0300
commit4beb075783e8f1b4081e429eec78dd96c3be57ae (patch)
tree3def5952657bbf63a0204a01a88e2c11414fecf1 /test
parentt/i/docker: reuse the root docker-compose.yml (diff)
downloadcgitize-4beb075783e8f1b4081e429eec78dd96c3be57ae.tar.gz
cgitize-4beb075783e8f1b4081e429eec78dd96c3be57ae.zip
rename Compose services, move directories around, etc.
Diffstat (limited to 'test')
-rw-r--r--test/integration/docker/.dockerignore4
-rw-r--r--test/integration/docker/cgitize/.gitignore (renamed from test/integration/docker/client/.gitignore)0
-rw-r--r--test/integration/docker/cgitize/etc/cgitize.toml (renamed from test/integration/docker/client/etc/cgitize.toml)0
-rw-r--r--test/integration/docker/docker-compose.yml11
-rw-r--r--test/integration/docker/git_server/Dockerfile (renamed from test/integration/docker/server/Dockerfile)2
-rwxr-xr-xtest/integration/docker/git_server/setup_repo.sh (renamed from test/integration/docker/server/setup_repo.sh)0
-rwxr-xr-xtest/integration/docker/test.sh8
7 files changed, 12 insertions, 13 deletions
diff --git a/test/integration/docker/.dockerignore b/test/integration/docker/.dockerignore
index c0cb0ce..a4e3191 100644
--- a/test/integration/docker/.dockerignore
+++ b/test/integration/docker/.dockerignore
@@ -1,5 +1,5 @@
*
-!/server/**
-/server/Dockerfile
+!/git_server/**
+/git_server/Dockerfile
!/ssh/**
diff --git a/test/integration/docker/client/.gitignore b/test/integration/docker/cgitize/.gitignore
index ea1472e..ea1472e 100644
--- a/test/integration/docker/client/.gitignore
+++ b/test/integration/docker/cgitize/.gitignore
diff --git a/test/integration/docker/client/etc/cgitize.toml b/test/integration/docker/cgitize/etc/cgitize.toml
index f20ba77..f20ba77 100644
--- a/test/integration/docker/client/etc/cgitize.toml
+++ b/test/integration/docker/cgitize/etc/cgitize.toml
diff --git a/test/integration/docker/docker-compose.yml b/test/integration/docker/docker-compose.yml
index b5560e2..1a5acf6 100644
--- a/test/integration/docker/docker-compose.yml
+++ b/test/integration/docker/docker-compose.yml
@@ -3,15 +3,14 @@ services:
git_server:
build:
context: .
- dockerfile: server/Dockerfile
- image: git_server
- backend:
+ dockerfile: git_server/Dockerfile
+ cgitize:
extends:
file: ../../../docker-compose.yml
- service: backend
+ service: cgitize
environment:
SCHEDULE: once
volumes:
- - ./client/etc/:/etc/cgitize:ro
+ - ./cgitize/etc:/etc/cgitize:ro
- "$SSH_AUTH_SOCK:/ssh-agent.sock"
- - ./client/output:/mnt/cgitize
+ - ./cgitize/output:/mnt/cgitize
diff --git a/test/integration/docker/server/Dockerfile b/test/integration/docker/git_server/Dockerfile
index 3ebe89b..a5756d3 100644
--- a/test/integration/docker/server/Dockerfile
+++ b/test/integration/docker/git_server/Dockerfile
@@ -16,7 +16,7 @@ RUN chmod 0600 -- /etc/ssh/ssh_host_ed25519_key && \
chmod 0700 -- ./.ssh/ && \
chmod 0600 -- ./.ssh/authorized_keys
-COPY ["server/setup_repo.sh", "./"]
+COPY ["git_server/setup_repo.sh", "./"]
RUN ./setup_repo.sh
ENTRYPOINT ["/sbin/tini", "--"]
diff --git a/test/integration/docker/server/setup_repo.sh b/test/integration/docker/git_server/setup_repo.sh
index 82ae711..82ae711 100755
--- a/test/integration/docker/server/setup_repo.sh
+++ b/test/integration/docker/git_server/setup_repo.sh
diff --git a/test/integration/docker/test.sh b/test/integration/docker/test.sh
index e55841f..239385e 100755
--- a/test/integration/docker/test.sh
+++ b/test/integration/docker/test.sh
@@ -10,7 +10,7 @@ readonly script_name
readonly ssh_dir="$script_dir/ssh"
readonly client_key_password='password'
-readonly output_dir="$script_dir/client/output"
+readonly output_dir="$script_dir/cgitize/output"
dump() {
local prefix="${FUNCNAME[0]}"
@@ -140,7 +140,7 @@ run_git_server() {
run_cgitize() {
echo
echo ----------------------------------------------------------------------
- echo Running the client
+ echo Running cgitize
echo ----------------------------------------------------------------------
if [ -z "${SSH_AUTH_SOCK:+x}" ]; then
@@ -148,7 +148,7 @@ run_cgitize() {
return 1
fi
dump "SSH_AUTH_SOCK: $SSH_AUTH_SOCK"
- docker-compose run --rm backend
+ docker-compose run --rm cgitize
}
run() {
@@ -162,7 +162,7 @@ verify() {
echo Checking the pulled repository
echo ----------------------------------------------------------------------
- pushd -- "$script_dir/client/output/test_repo" > /dev/null
+ pushd -- "$script_dir/cgitize/output/test_repo" > /dev/null
git log --oneline
popd > /dev/null
}