improve test scripts

This commit is contained in:
sstidl 2024-12-01 22:44:37 +01:00
parent c00ad26abe
commit a177238636
2 changed files with 27 additions and 3 deletions

View file

@ -2,7 +2,7 @@
## do not use it in production
services:
###################### POSTGRESQL ################################
###################### POSTGRESQL ################################
pg:
image: postgres:alpine
environment:
@ -39,7 +39,7 @@ services:
ports:
- 9124:8080
####################### MYSQL ##############################
####################### MYSQL ##############################
mysql:
image: mysql:lts
@ -79,7 +79,8 @@ services:
ports:
- 9126:8080
###### SQLITE ######
################ SQLITE ####################################
speedtest-debian-sqlite:
# check at http://localhost:9125/results/sanitycheck.php
build:
@ -102,3 +103,12 @@ services:
environment: *env_vars_sqlite
ports:
- 9128:8080
############## TEST CONTAINER ###############################################################
test-container:
image: alpine
volumes:
- ./test-script.sh:/test-script.sh
command:
- sh
- /test-script.sh

View file

@ -0,0 +1,14 @@
PORT=8080
apk add w3m
echo sleeping a little to get things setteled...
sleep 10
for db in sqlite pg mysql; do
for distro in alpine debian; do
hostname=speedtest-$distro-$db
echo $hostname
w3m -dump http://$hostname:$PORT/results/sanitycheck.php|grep -v 'N/A'
done
done