1import ./make-test.nix ({ lib, ... }:
2{
3 name = "grafana";
4
5 meta = with lib.maintainers; {
6 maintainers = [ willibutz ];
7 };
8
9 machine = { ... }: {
10 services.grafana = {
11 enable = true;
12 addr = "localhost";
13 analytics.reporting.enable = false;
14 domain = "localhost";
15 security.adminUser = "testusername";
16 };
17 };
18
19 testScript = ''
20 $machine->start;
21 $machine->waitForUnit("grafana.service");
22 $machine->waitForOpenPort(3000);
23 $machine->succeed("curl -sSfL http://127.0.0.1:3000/");
24 '';
25})