Skip to content

Commit

Permalink
improve test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sstidl committed Dec 1, 2024
1 parent c00ad26 commit a177238
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
16 changes: 13 additions & 3 deletions docker/test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## do not use it in production

services:
###################### POSTGRESQL ################################
###################### POSTGRESQL ################################
pg:
image: postgres:alpine
environment:
Expand Down Expand Up @@ -39,7 +39,7 @@ services:
ports:
- 9124:8080

####################### MYSQL ##############################
####################### MYSQL ##############################

mysql:
image: mysql:lts
Expand Down Expand Up @@ -79,7 +79,8 @@ services:
ports:
- 9126:8080

###### SQLITE ######
################ SQLITE ####################################

speedtest-debian-sqlite:
# check at http://localhost:9125/results/sanitycheck.php
build:
Expand All @@ -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
14 changes: 14 additions & 0 deletions docker/test/test-script.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a177238

Please sign in to comment.