1import ./make-test-python.nix (
2 { lib, pkgs, ... }:
3
4 {
5 name = "workout-tracker";
6
7 meta.maintainers = with lib.maintainers; [ bhankas ];
8
9 nodes.machine =
10 { config, ... }:
11 {
12 virtualisation.memorySize = 2048;
13
14 services.workout-tracker.enable = true;
15 };
16
17 testScript = ''
18 start_all()
19 machine.wait_for_unit("workout-tracker.service")
20 # wait for workout-tracker to fully come up
21
22 with subtest("workout-tracker service starts"):
23 machine.wait_until_succeeds(
24 "curl -sSfL http://localhost:8080/ > /dev/null",
25 timeout=30
26 )
27 '';
28 }
29)