2022-06-15 13:11:03 +03:00
|
|
|
import ./make-test-python.nix ({ lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
nodes = {
|
|
|
|
machine = {
|
|
|
|
services.grafana-agent = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
name = "grafana-agent";
|
|
|
|
|
|
|
|
meta = with lib.maintainers; {
|
|
|
|
maintainers = [ zimbatm ];
|
|
|
|
};
|
|
|
|
|
|
|
|
inherit nodes;
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
start_all()
|
|
|
|
|
|
|
|
with subtest("Grafana-agent is running"):
|
|
|
|
machine.wait_for_unit("grafana-agent.service")
|
2022-06-19 13:23:06 +03:00
|
|
|
machine.wait_for_open_port(12345)
|
2022-06-15 13:11:03 +03:00
|
|
|
machine.succeed(
|
2022-06-19 13:23:06 +03:00
|
|
|
"curl -sSfN http://127.0.0.1:12345/-/healthy"
|
2022-06-15 13:11:03 +03:00
|
|
|
)
|
|
|
|
machine.shutdown()
|
|
|
|
'';
|
|
|
|
})
|