summaryrefslogtreecommitdiff
path: root/tests/run-tests.sh
diff options
context:
space:
mode:
authorQuentin Aristote <quentin@aristote.fr>2021-11-26 15:45:22 +0100
committerQuentin Aristote <quentin@aristote.fr>2021-11-26 15:45:22 +0100
commit00502b9f169f030cddc83b9b9b75a25de09a14e4 (patch)
tree308402c637bac46dbfaff52e6b597e78c6b54930 /tests/run-tests.sh
parent587fd812a88b3260c7f51c46e1ba963cdb169cac (diff)
add simple test script
Diffstat (limited to 'tests/run-tests.sh')
-rw-r--r--tests/run-tests.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/run-tests.sh b/tests/run-tests.sh
new file mode 100644
index 0000000..52f4a1e
--- /dev/null
+++ b/tests/run-tests.sh
@@ -0,0 +1,13 @@
+#! /usr/bin/env nix-shell
+#! nix-shell --packages curl
+
+sudo nixos-container update hermes --config-file ./vm.nix || exit 2
+sudo nixos-container start hermes || exit 2
+
+IP=$(nixos-container show-ip hermes)
+for PORT in 8080 8081 8082
+do
+ curl http://$IP:$PORT/ -i || exit 2
+done
+
+sudo nixos-container stop hermes