mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 05:04:00 +00:00
8b926cad93
We now don't explicitly configure a self-chosen port, but use the default port choosen by grafana, 12345.
33 lines
640 B
Nix
33 lines
640 B
Nix
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")
|
|
machine.wait_for_open_port(12345)
|
|
machine.succeed(
|
|
"curl -sSfN http://127.0.0.1:12345/-/healthy"
|
|
)
|
|
machine.shutdown()
|
|
'';
|
|
})
|