2017-09-18 14:59:50 +00:00
|
|
|
import ./make-test.nix ({ lib, ... }:
|
|
|
|
{
|
|
|
|
name = "grafana";
|
|
|
|
|
|
|
|
meta = with lib.maintainers; {
|
|
|
|
maintainers = [ willibutz ];
|
|
|
|
};
|
|
|
|
|
2018-07-20 20:56:59 +00:00
|
|
|
machine = { ... }: {
|
2017-09-18 14:59:50 +00:00
|
|
|
services.grafana = {
|
|
|
|
enable = true;
|
|
|
|
addr = "localhost";
|
|
|
|
analytics.reporting.enable = false;
|
|
|
|
domain = "localhost";
|
|
|
|
security.adminUser = "testusername";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
$machine->start;
|
|
|
|
$machine->waitForUnit("grafana.service");
|
|
|
|
$machine->waitForOpenPort(3000);
|
2018-03-08 13:14:47 +00:00
|
|
|
$machine->succeed("curl -sSfL http://127.0.0.1:3000/");
|
2017-09-18 14:59:50 +00:00
|
|
|
'';
|
|
|
|
})
|