nixpkgs/nixos/tests/goatcounter.nix

31 lines
599 B
Nix
Raw Permalink Normal View History

{ lib, pkgs, ... }:
2024-07-15 00:44:11 +05:30
{
name = "goatcounter";
2024-07-15 00:44:11 +05:30
meta.maintainers = with lib.maintainers; [ bhankas ];
2024-07-15 00:44:11 +05:30
nodes.machine =
{ config, ... }:
{
virtualisation.memorySize = 2048;
2024-07-15 00:44:11 +05:30
services.goatcounter = {
enable = true;
proxy = true;
2024-07-15 00:44:11 +05:30
};
};
2024-07-15 00:44:11 +05:30
testScript = ''
start_all()
machine.wait_for_unit("goatcounter.service")
# wait for goatcounter to fully come up
2024-07-15 00:44:11 +05:30
with subtest("goatcounter service starts"):
machine.wait_until_succeeds(
"curl -sSfL http://localhost:8081/ > /dev/null",
timeout=30
)
'';
}