Skip to content

Commit 6a68779

Browse files
committed
Ref #187 - Also test with another user
1 parent 6d69b77 commit 6a68779

3 files changed

Lines changed: 73 additions & 2 deletions

File tree

.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", "mariadb:latest", "mysql:5.7", "mysql:latest"]
18-
configuration: ["default", "one-host", "one-socket-host", "config-mount-dir", "fs-import-export", "different-apache-port"]
18+
configuration: ["default", "one-host", "one-socket-host", "config-mount-dir", "fs-import-export", "different-apache-port", "run-as-www-data"]
1919

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

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-one-socket-host testing-config-mount-dir testing-fs-import-export testing-different-apache-port
25+
run-tests: testing-default testing-one-host testing-one-socket-host testing-config-mount-dir testing-fs-import-export testing-different-apache-port run-as-www-data
2626

2727
logs:
2828
docker compose -f ./testing/docker-compose/docker-compose.testing-default.yml logs
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
version: "3.1"
2+
3+
services:
4+
db_server:
5+
image: ${DB:-mariadb:10.11}
6+
environment:
7+
MARIADB_ROOT_PASSWORD: "${TESTSUITE_PASSWORD:-my-secret-pw}"
8+
healthcheck:
9+
test: ["CMD", "mariadb-admin", "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+
# www-data:www-data in Debian (https://stackoverflow.com/a/69290889/5155484)
25+
user: 33:33
26+
environment:
27+
PMA_HOST: db_server
28+
UPLOAD_LIMIT: 123M
29+
MAX_EXECUTION_TIME: 125
30+
HIDE_PHP_VERSION: 1
31+
volumes:
32+
- ../config.user.inc.php:/etc/phpmyadmin/config.user.inc.php:ro
33+
healthcheck:
34+
test: ["CMD", "curl", "-Ss", "http://localhost/robots.txt"]
35+
start_period: 5s
36+
interval: 3s
37+
timeout: 60s
38+
retries: 10
39+
networks:
40+
testing:
41+
aliases:
42+
- phpmyadmin_testing_apache
43+
depends_on:
44+
db_server:
45+
condition: service_healthy
46+
47+
sut:
48+
depends_on:
49+
phpmyadmin:
50+
condition: service_healthy
51+
db_server:
52+
condition: service_healthy
53+
build:
54+
context: ../
55+
command: "/tests/testing/test-docker.sh"
56+
networks:
57+
testing:
58+
environment:
59+
TESTSUITE_HOSTNAME: phpmyadmin_testing_apache
60+
TESTSUITE_PORT: 80
61+
TESTSUITE_PASSWORD: "${TESTSUITE_PASSWORD:-my-secret-pw}"
62+
PMA_HOST: phpmyadmin_testing_db
63+
PMA_PORT: 3306
64+
volumes:
65+
- ../../:/tests:ro
66+
- /var/run/docker.sock:/var/run/docker.sock
67+
working_dir: /tests
68+
69+
networks:
70+
testing:
71+
driver: bridge

0 commit comments

Comments
 (0)