nixpkgs/nixos/tests/workout-tracker.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
576 B
Nix
Raw Normal View History

{ lib, pkgs, ... }:
2024-03-16 14:26:22 +05:30
{
name = "workout-tracker";
2024-03-16 14:26:22 +05:30
meta.maintainers = with lib.maintainers; [ bhankas ];
2024-03-16 14:26:22 +05:30
nodes.machine =
{ config, ... }:
{
virtualisation.memorySize = 2048;
2024-03-16 14:26:22 +05:30
services.workout-tracker.enable = true;
};
2024-03-16 14:26:22 +05:30
testScript = ''
start_all()
machine.wait_for_unit("workout-tracker.service")
# wait for workout-tracker to fully come up
2024-03-16 14:26:22 +05:30
with subtest("workout-tracker service starts"):
machine.wait_until_succeeds(
"curl -sSfL http://localhost:8080/ > /dev/null",
timeout=30
)
'';
}