about summary refs log tree commit diff
path: root/nixos/tests/workout-tracker.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/workout-tracker.nix')
-rw-r--r--nixos/tests/workout-tracker.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/nixos/tests/workout-tracker.nix b/nixos/tests/workout-tracker.nix
new file mode 100644
index 0000000000000..1ad509edf2d4c
--- /dev/null
+++ b/nixos/tests/workout-tracker.nix
@@ -0,0 +1,29 @@
+import ./make-test-python.nix (
+  { lib, pkgs, ... }:
+
+  {
+    name = "workout-tracker";
+
+    meta.maintainers = with lib.maintainers; [ bhankas ];
+
+    nodes.machine =
+      { config, ... }:
+      {
+        virtualisation.memorySize = 2048;
+
+        services.workout-tracker.enable = true;
+      };
+
+    testScript = ''
+      start_all()
+      machine.wait_for_unit("workout-tracker.service")
+      # wait for workout-tracker to fully come up
+
+      with subtest("workout-tracker service starts"):
+          machine.wait_until_succeeds(
+              "curl -sSfL http://localhost:8080/ > /dev/null",
+              timeout=30
+          )
+    '';
+  }
+)