at 23.05-pre 640 B view raw
1import ./make-test-python.nix ({ lib, pkgs, ... }: 2 3 let 4 nodes = { 5 machine = { 6 services.grafana-agent = { 7 enable = true; 8 }; 9 }; 10 }; 11 in 12 { 13 name = "grafana-agent"; 14 15 meta = with lib.maintainers; { 16 maintainers = [ zimbatm ]; 17 }; 18 19 inherit nodes; 20 21 testScript = '' 22 start_all() 23 24 with subtest("Grafana-agent is running"): 25 machine.wait_for_unit("grafana-agent.service") 26 machine.wait_for_open_port(12345) 27 machine.succeed( 28 "curl -sSfN http://127.0.0.1:12345/-/healthy" 29 ) 30 machine.shutdown() 31 ''; 32 })