Skip to content

Commit

Permalink
Replace docker-compose by docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
MehdiChinoune committed Apr 2, 2024
1 parent 78305b5 commit 97b19f4
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 13 deletions.
10 changes: 3 additions & 7 deletions .ci/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@

set -e

# check for docker-compose and docker availability
# check for docker availability
command -v docker > /dev/null || {
echo "Please install docker" >&2
exit 1
}
command -v docker-compose > /dev/null || {
echo "Please install docker-compose" >&2
exit 1
}

IMAGE_BUILD_DEPS=qgis/qgis3-build-deps:latest
UPDATE_IMAGES=yes
Expand Down Expand Up @@ -115,7 +111,7 @@ if test "$(docker images -q qgis3-build-deps-binary-image)" = ""; then
fi

if test "${INTERACTIVE}" = "no"; then
echo "--=[ Running tests via docker-compose"
echo "--=[ Running tests via docker compose"
COMMAND=${QGIS_WORKSPACE_MOUNTPOINT}/.docker/docker-qgis-test.sh
COMMAND_ARGS="${TESTS_TO_RUN}"
else
Expand All @@ -129,7 +125,7 @@ mkdir -p /tmp/minio_tests/test-bucket && chmod -R 777 /tmp/minio_tests
# Create an empty webdav folder with appropriate permissions so www user can write inside it
mkdir -p /tmp/webdav_tests && chmod 777 /tmp/webdav_tests

docker-compose \
docker compose \
-f .docker/docker-compose-testing.yml \
run \
-w "${QGIS_WORKSPACE_MOUNTPOINT}" \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ogc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ jobs:
- name: Run WMS 1.3.0 OGC tests
run: |
source venv/bin/activate && ./pyogctest/pyogctest.py -s wms130 -e
docker-compose -f .ci/ogc/docker-compose.yml up -d
docker compose -f .ci/ogc/docker-compose.yml up -d
source venv/bin/activate && ./pyogctest/pyogctest.py -n ogc_qgis -s wms130 -v -u http://$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' qgis_server_nginx)/qgisserver_wms130
env:
DOCKER_IMAGE: ${{ steps.docker-build.outputs.imageid }}

- name: Run OGC API Features 1.0 tests
run: |
cd data && git clone https://github.com/qgis/QGIS-Training-Data && cd -
docker-compose -f .ci/ogc/docker-compose.yml up -d
docker compose -f .ci/ogc/docker-compose.yml up -d
source venv/bin/activate && ./pyogctest/pyogctest.py -n ogc_qgis -s ogcapif -v -u http://$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' qgis_server_nginx)/qgisserver_ogcapif
env:
DOCKER_IMAGE: ${{ steps.docker-build.outputs.imageid }}
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ jobs:
echo "DOCKERFILE=$DOCKERFILE"
mkdir -p /tmp/webdav_tests && chmod 777 /tmp/webdav_tests
mkdir -p /tmp/minio_tests/test-bucket && chmod -R 777 /tmp/minio_tests
docker-compose -f .docker/$DOCKERFILE run -e GITHUB_SHA=$GITHUB_SHA qgis-deps /root/QGIS/.docker/docker-qgis-test.sh $TEST_BATCH
docker compose -f .docker/$DOCKERFILE run -e GITHUB_SHA=$GITHUB_SHA qgis-deps /root/QGIS/.docker/docker-qgis-test.sh $TEST_BATCH
- name: Fix permissions on test report
if: ${{ failure() }}
Expand Down
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Some tests require a specific PostgreSQL server configuration
to bring up such server would be to (tweak $srcdir appropriately):

QGIS_WORKSPACE=${srcdir} \
docker-compose -f .docker/docker-compose-testing-postgres.yml up -d postgres
docker compose -f .docker/docker-compose-testing-postgres.yml up -d postgres
export PGHOST=`docker inspect docker_postgres_1 | jq -r .[0].NetworkSettings.Networks.docker_default.IPAddress`
export PGUSER=docker
export PGPASSWORD=docker
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_authmanager_password_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
It uses a docker container as postgres/postgis server with certificates from tests/testdata/auth_system/certs_keys_2048
Use docker-compose -f .docker/docker-compose-testing-postgres.yml up postgres to start the server
Use docker compose -f .docker/docker-compose-testing-postgres.yml up postgres to start the server
TODO:
- Document how to restore the server data
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_authmanager_pki_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
It uses a docker container as postgres/postgis server with certificates from tests/testdata/auth_system/certs_keys_2048
Use docker-compose -f .docker/docker-compose-testing-postgres.yml up postgres to start the server.
Use docker compose -f .docker/docker-compose-testing-postgres.yml up postgres to start the server.
TODO:
- Document how to restore the server data
Expand Down

0 comments on commit 97b19f4

Please sign in to comment.