From 0ea7865be0365f430f1d4d9f2ce960a17350a938 Mon Sep 17 00:00:00 2001 From: lucasheld Date: Tue, 4 Oct 2022 19:10:06 +0200 Subject: [PATCH] test: add script to run tests for all supported uptime kuma versions --- run_tests.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 run_tests.sh diff --git a/run_tests.sh b/run_tests.sh new file mode 100755 index 0000000..ad7a0f0 --- /dev/null +++ b/run_tests.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +for version in 1.17.0 1.17.1 1.18.0 1.18.2 +do + echo "Starting uptime kuma $version..." + docker run -d -it --rm -p 3001:3001 --name uptimekuma "louislam/uptime-kuma:$version" > /dev/null + + while [[ "$(curl -s -L -o /dev/null -w ''%{http_code}'' 127.0.0.1:3001)" != "200" ]] + do + sleep 1 + done + + echo "Running tests..." + python -m unittest discover -s tests + + echo "Stopping uptime kuma..." + docker stop uptimekuma > /dev/null + + echo '' +done