]> WPIA git - infra.git/commitdiff
add: utility for minimal testing
authorFelix Dörre <felix@dogcraft.de>
Tue, 28 Mar 2017 08:38:26 +0000 (10:38 +0200)
committerFelix Dörre <felix@dogcraft.de>
Tue, 28 Mar 2017 21:31:18 +0000 (23:31 +0200)
The script tests a finished Gigi installation
by checking if it returns any page on /.
The root certificate is downloaded from /roots?pem.

Change-Id: I91d91761b82bb2b0425cd3c2ffcc746a59db51a3

manager/quick-test [new file with mode: 0755]

diff --git a/manager/quick-test b/manager/quick-test
new file mode 100755 (executable)
index 0000000..1165c4f
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+set -e
+
+if ! [[ -f $1/config ]]; then
+    printf "Fail: config not found\n" >&2
+    exit 1
+fi
+source "$1/config"
+
+wget --no-hsts -q -O root.crt http://www.$domain/roots?pem
+wget -q --ca-certificate=root.crt https://www.$domain -O /dev/null
+printf "Validation successful\n"