Skip to content

Commit a6c091b

Browse files
committed
Add a test for #401 - /etc/phpmyadmin/conf.d/
1 parent d455a71 commit a6c091b

File tree

3 files changed

+71
-2
lines changed

3 files changed

+71
-2
lines changed

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
database-image: ["mariadb:10.6", "mariadb:10.11", "mysql:5.7", "mariadb:latest", "mysql:latest"]
18-
configuration: ["default", "one-host", "fs-import-export", "different-apache-port"]
18+
configuration: ["default", "one-host", "config-mount-dir", "fs-import-export", "different-apache-port"]
1919

2020
steps:
2121
- uses: actions/checkout@v3

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ testing-%:
2222
docker-compose -p "phpmyadmin_$@" -f ./testing/docker-compose/docker-compose.$@.yml up --build --abort-on-container-exit --exit-code-from=sut
2323
docker-compose -p "phpmyadmin_$@" -f ./testing/docker-compose/docker-compose.$@.yml down
2424

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

2727
logs:
2828
docker-compose -f ./testing/docker-compose/docker-compose.testing-default.yml logs
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
version: "3.1"
2+
3+
services:
4+
db_server:
5+
image: ${DB:-mariadb:10.11}
6+
environment:
7+
MYSQL_ROOT_PASSWORD: "${TESTSUITE_PASSWORD:-my-secret-pw}"
8+
healthcheck:
9+
test: ["CMD", "mysqladmin", "ping", "-uroot", "-p${TESTSUITE_PASSWORD:-my-secret-pw}"]
10+
start_period: 10s
11+
interval: 5s
12+
timeout: 60s
13+
retries: 10
14+
networks:
15+
testing:
16+
aliases:
17+
- phpmyadmin_testing_db
18+
tmpfs:
19+
- /var/lib/mysql:rw,noexec,nosuid,size=300m
20+
21+
phpmyadmin:
22+
build:
23+
context: ../../apache
24+
environment:
25+
PMA_HOST: db_server
26+
UPLOAD_LIMIT: 123M
27+
MAX_EXECUTION_TIME: 125
28+
HIDE_PHP_VERSION: 1
29+
volumes:
30+
- ../config.user.inc.php:/etc/phpmyadmin/conf.d/config.test.php:ro
31+
healthcheck:
32+
test: ["CMD", "curl", "-Ss", "http://localhost/robots.txt"]
33+
start_period: 5s
34+
interval: 3s
35+
timeout: 60s
36+
retries: 10
37+
networks:
38+
testing:
39+
aliases:
40+
- phpmyadmin_testing_apache
41+
depends_on:
42+
db_server:
43+
condition: service_healthy
44+
45+
sut:
46+
depends_on:
47+
phpmyadmin:
48+
condition: service_healthy
49+
db_server:
50+
condition: service_healthy
51+
build:
52+
context: ../
53+
command: "/tests/testing/test-docker.sh"
54+
networks:
55+
testing:
56+
environment:
57+
TESTSUITE_HOSTNAME: phpmyadmin_testing_apache
58+
TESTSUITE_PORT: 80
59+
TESTSUITE_PASSWORD: "${TESTSUITE_PASSWORD:-my-secret-pw}"
60+
PMA_HOST: phpmyadmin_testing_db
61+
PMA_PORT: 3306
62+
volumes:
63+
- ../../:/tests:ro
64+
- /var/run/docker.sock:/var/run/docker.sock
65+
working_dir: /tests
66+
67+
networks:
68+
testing:
69+
driver: bridge

0 commit comments

Comments
 (0)