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