diff options
| author | Egor Tensin <egor@tensin.name> | 2026-10-13 00:32:55 +0500 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-10-13 00:32:59 +0500 |
| commit | e231346fdd87520b0cd154aaab8a366f49a9a953 (patch) | |
| tree | b541835914663ddc14a7ffcbd2a285046c362a4a /test/integration | |
| parent | workflows/ci: prettify YAML (diff) | |
| download | cgitize-e231346fdd87520b0cd154aaab8a366f49a9a953.tar.gz cgitize-e231346fdd87520b0cd154aaab8a366f49a9a953.zip | |
reshuffle Docker-related files
* The root docker-compose.yml was not used anywhere but the tests, so its
contents was moved there.
* Some more refactoring and shortening of paths in t/i/docker.
* Removed .dockerignore files - I don't think they're needed, since I
always use explicit COPY instructions with paths, etc., but I may as
well be quite wrong on this one.
* Removed examples/docker/ - don't think this one was used at all?
Diffstat (limited to 'test/integration')
| -rw-r--r-- | test/integration/docker/.dockerignore | 5 | ||||
| -rw-r--r-- | test/integration/docker/.gitignore | 2 | ||||
| -rw-r--r-- | test/integration/docker/cgitize/.gitignore | 1 | ||||
| -rw-r--r-- | test/integration/docker/docker-compose.yml | 27 | ||||
| -rw-r--r-- | test/integration/docker/etc/cgitize.toml (renamed from test/integration/docker/cgitize/etc/cgitize.toml) | 0 | ||||
| -rw-r--r-- | test/integration/docker/git_server/Dockerfile | 6 | ||||
| -rwxr-xr-x | test/integration/docker/test.sh | 8 |
7 files changed, 23 insertions, 26 deletions
diff --git a/test/integration/docker/.dockerignore b/test/integration/docker/.dockerignore deleted file mode 100644 index a4e3191..0000000 --- a/test/integration/docker/.dockerignore +++ /dev/null @@ -1,5 +0,0 @@ -* - -!/git_server/** -/git_server/Dockerfile -!/ssh/** diff --git a/test/integration/docker/.gitignore b/test/integration/docker/.gitignore new file mode 100644 index 0000000..c0680ca --- /dev/null +++ b/test/integration/docker/.gitignore @@ -0,0 +1,2 @@ +output/ +ssh_keys/ diff --git a/test/integration/docker/cgitize/.gitignore b/test/integration/docker/cgitize/.gitignore deleted file mode 100644 index ea1472e..0000000 --- a/test/integration/docker/cgitize/.gitignore +++ /dev/null @@ -1 +0,0 @@ -output/ diff --git a/test/integration/docker/docker-compose.yml b/test/integration/docker/docker-compose.yml index 703dbd0..75391b8 100644 --- a/test/integration/docker/docker-compose.yml +++ b/test/integration/docker/docker-compose.yml @@ -1,21 +1,22 @@ services: - git_server: - build: - context: . - dockerfile: git_server/Dockerfile cgitize: - extends: - file: ../../../docker-compose.yml - service: cgitize + build: + context: ../../.. + dockerfile: docker/Dockerfile environment: SCHEDULE: once volumes: - - ./cgitize/etc:/etc/cgitize:ro + - ./etc:/etc/cgitize:ro - "$SSH_AUTH_SOCK:/ssh-agent.sock" - - ./cgitize/output:/mnt/cgitize + - ./output:/mnt/cgitize frontend: - extends: - file: ../../../docker-compose.yml - service: frontend + build: + context: ../../../docker/frontend + ports: + - '127.0.0.1:80:80' volumes: - - ./cgitize/output:/mnt/cgitize:ro + - ./output:/mnt/cgitize:ro + git_server: + build: + context: . + dockerfile: git_server/Dockerfile diff --git a/test/integration/docker/cgitize/etc/cgitize.toml b/test/integration/docker/etc/cgitize.toml index f20ba77..f20ba77 100644 --- a/test/integration/docker/cgitize/etc/cgitize.toml +++ b/test/integration/docker/etc/cgitize.toml diff --git a/test/integration/docker/git_server/Dockerfile b/test/integration/docker/git_server/Dockerfile index 8e4b841..97306f9 100644 --- a/test/integration/docker/git_server/Dockerfile +++ b/test/integration/docker/git_server/Dockerfile @@ -9,9 +9,9 @@ RUN apk add -q --no-cache bash git openssh-server tini && \ WORKDIR /root -COPY ["ssh/server_key", "/etc/ssh/ssh_host_ed25519_key"] -COPY ["ssh/server_key.pub", "/etc/ssh/ssh_host_ed25519_key.pub"] -COPY ["ssh/client_key.pub", "./.ssh/authorized_keys"] +COPY ["ssh_keys/server_key", "/etc/ssh/ssh_host_ed25519_key"] +COPY ["ssh_keys/server_key.pub", "/etc/ssh/ssh_host_ed25519_key.pub"] +COPY ["ssh_keys/client_key.pub", "./.ssh/authorized_keys"] RUN chmod 0600 -- /etc/ssh/ssh_host_ed25519_key && \ chmod 0700 -- ./.ssh/ && \ diff --git a/test/integration/docker/test.sh b/test/integration/docker/test.sh index 7915ca1..ae43b71 100755 --- a/test/integration/docker/test.sh +++ b/test/integration/docker/test.sh @@ -12,10 +12,10 @@ readonly script_name # This is still required with older Compose versions to use TARGETARCH: export DOCKER_BUILDKIT=1 -readonly ssh_dir="$script_dir/ssh" +readonly ssh_dir="$script_dir/ssh_keys" readonly client_key_password='password' -readonly output_dir="$script_dir/cgitize/output" -readonly frontend_host=localhost +readonly output_dir="$script_dir/output" +readonly frontend_host=127.0.0.1 dump() { local prefix="${FUNCNAME[0]}" @@ -219,7 +219,7 @@ verify_git() { echo Checking the pulled repository echo ---------------------------------------------------------------------- - pushd -- "$script_dir/cgitize/output/test_repo.git" > /dev/null + pushd -- "$script_dir/output/test_repo.git" > /dev/null git log --oneline popd > /dev/null } |
