Skip to content

Commit

Permalink
Add a test for phpmyadmin#401 - /etc/phpmyadmin/conf.d/
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Jun 29, 2023
1 parent d455a71 commit a6c091b
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
database-image: ["mariadb:10.6", "mariadb:10.11", "mysql:5.7", "mariadb:latest", "mysql:latest"]
configuration: ["default", "one-host", "fs-import-export", "different-apache-port"]
configuration: ["default", "one-host", "config-mount-dir", "fs-import-export", "different-apache-port"]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ testing-%:
docker-compose -p "phpmyadmin_$@" -f ./testing/docker-compose/docker-compose.$@.yml up --build --abort-on-container-exit --exit-code-from=sut
docker-compose -p "phpmyadmin_$@" -f ./testing/docker-compose/docker-compose.$@.yml down

run-tests: testing-default testing-one-host testing-fs-import-export testing-different-apache-port
run-tests: testing-default testing-one-host testing-config-mount-dir testing-fs-import-export testing-different-apache-port

logs:
docker-compose -f ./testing/docker-compose/docker-compose.testing-default.yml logs
Expand Down
69 changes: 69 additions & 0 deletions testing/docker-compose/docker-compose.testing-config-mount-dir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
version: "3.1"

services:
db_server:
image: ${DB:-mariadb:10.11}
environment:
MYSQL_ROOT_PASSWORD: "${TESTSUITE_PASSWORD:-my-secret-pw}"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-uroot", "-p${TESTSUITE_PASSWORD:-my-secret-pw}"]
start_period: 10s
interval: 5s
timeout: 60s
retries: 10
networks:
testing:
aliases:
- phpmyadmin_testing_db
tmpfs:
- /var/lib/mysql:rw,noexec,nosuid,size=300m

phpmyadmin:
build:
context: ../../apache
environment:
PMA_HOST: db_server
UPLOAD_LIMIT: 123M
MAX_EXECUTION_TIME: 125
HIDE_PHP_VERSION: 1
volumes:
- ../config.user.inc.php:/etc/phpmyadmin/conf.d/config.test.php:ro
healthcheck:
test: ["CMD", "curl", "-Ss", "http://localhost/robots.txt"]
start_period: 5s
interval: 3s
timeout: 60s
retries: 10
networks:
testing:
aliases:
- phpmyadmin_testing_apache
depends_on:
db_server:
condition: service_healthy

sut:
depends_on:
phpmyadmin:
condition: service_healthy
db_server:
condition: service_healthy
build:
context: ../
command: "/tests/testing/test-docker.sh"
networks:
testing:
environment:
TESTSUITE_HOSTNAME: phpmyadmin_testing_apache
TESTSUITE_PORT: 80
TESTSUITE_PASSWORD: "${TESTSUITE_PASSWORD:-my-secret-pw}"
PMA_HOST: phpmyadmin_testing_db
PMA_PORT: 3306
volumes:
- ../../:/tests:ro
- /var/run/docker.sock:/var/run/docker.sock
working_dir: /tests

networks:
testing:
driver: bridge

0 comments on commit a6c091b

Please sign in to comment.