Skip to content

Commit a177238

Browse files
committed
improve test scripts
1 parent c00ad26 commit a177238

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

docker/test/docker-compose.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
## do not use it in production
33

44
services:
5-
###################### POSTGRESQL ################################
5+
###################### POSTGRESQL ################################
66
pg:
77
image: postgres:alpine
88
environment:
@@ -39,7 +39,7 @@ services:
3939
ports:
4040
- 9124:8080
4141

42-
####################### MYSQL ##############################
42+
####################### MYSQL ##############################
4343

4444
mysql:
4545
image: mysql:lts
@@ -79,7 +79,8 @@ services:
7979
ports:
8080
- 9126:8080
8181

82-
###### SQLITE ######
82+
################ SQLITE ####################################
83+
8384
speedtest-debian-sqlite:
8485
# check at http://localhost:9125/results/sanitycheck.php
8586
build:
@@ -102,3 +103,12 @@ services:
102103
environment: *env_vars_sqlite
103104
ports:
104105
- 9128:8080
106+
107+
############## TEST CONTAINER ###############################################################
108+
test-container:
109+
image: alpine
110+
volumes:
111+
- ./test-script.sh:/test-script.sh
112+
command:
113+
- sh
114+
- /test-script.sh

docker/test/test-script.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
PORT=8080
2+
3+
apk add w3m
4+
5+
echo sleeping a little to get things setteled...
6+
sleep 10
7+
8+
for db in sqlite pg mysql; do
9+
for distro in alpine debian; do
10+
hostname=speedtest-$distro-$db
11+
echo $hostname
12+
w3m -dump http://$hostname:$PORT/results/sanitycheck.php|grep -v 'N/A'
13+
done
14+
done

0 commit comments

Comments
 (0)