From fe85a805ac4a89927926c70f2c8d636c9c9435f3 Mon Sep 17 00:00:00 2001 From: sstidl Date: Sun, 29 Dec 2024 16:41:50 +0000 Subject: [PATCH] documentation of docker tests --- docker/test/README.md | 4 ++++ docker/test/docker-compose.yml | 5 +++++ docker/test/test-script.sh | 6 +++++- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 docker/test/README.md diff --git a/docker/test/README.md b/docker/test/README.md new file mode 100644 index 0000000..cafd486 --- /dev/null +++ b/docker/test/README.md @@ -0,0 +1,4 @@ +The files in this folder represent a simple end to end test. +At the moment it is interactive, so you need to run `docker compose up` in the folder and watch the output for errors. +Sometimes the mysql container needs more than 15 seconds, so the test_script fails. +Just try it again. \ No newline at end of file diff --git a/docker/test/docker-compose.yml b/docker/test/docker-compose.yml index ca622e2..4040485 100644 --- a/docker/test/docker-compose.yml +++ b/docker/test/docker-compose.yml @@ -129,6 +129,11 @@ services: ############## TEST CONTAINER ############################################################### test-container: image: alpine + depends_on: + - pg + - mysql + - speedtest-alpine-mysql + - speedtest-alpine-pg volumes: - ./test-script.sh:/test-script.sh command: diff --git a/docker/test/test-script.sh b/docker/test/test-script.sh index 27d2360..8d39e4f 100644 --- a/docker/test/test-script.sh +++ b/docker/test/test-script.sh @@ -1,9 +1,13 @@ +#!/bin/sh + +## simple script to call sanitycheck on all containers + PORT=8080 apk add w3m echo sleeping a little to get things setteled... -sleep 10 +sleep 15 for db in sqlite pg mysql; do for distro in alpine debian; do