Skip to content

Commit b04f589

Browse files
committed
Add automated smoketest
1 parent 4fbb855 commit b04f589

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

docker-compose.test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: '3.5'
2+
3+
services:
4+
db:
5+
image: mariadb:10.3
6+
environment:
7+
MYSQL_ROOT_PASSWORD: wordpress
8+
MYSQL_DATABASE: wordpress
9+
MYSQL_USER: wordpress
10+
MYSQL_PASSWORD: wordpress
11+
12+
wordpress:
13+
depends_on:
14+
- db
15+
build: ./
16+
environment:
17+
DB_HOST: db
18+
DB_PASSWORD: wordpress
19+
DB_NAME: wordpress
20+
DB_USER: wordpress
21+
WORDPRESS_SITE_URL: http://localhost
22+
FS_METHOD: direct
23+
24+
sut:
25+
image: alpine:3.10
26+
depends_on:
27+
- wordpress
28+
command: /tmp/run_tests.sh
29+
volumes:
30+
- "./run_tests.sh:/tmp/run_tests.sh:ro"

run_tests.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
apk --no-cache add curl
3+
while ! curl -fs wordpress > /dev/null; do echo -n '.'; sleep 1; done;
4+
curl --silent --fail http://wordpress/wp-admin/install.php | grep 'wp-core-ui' > /dev/null

0 commit comments

Comments
 (0)