summary refs log tree commit diff
path: root/nixos/tests/grafana.nix
diff options
context:
space:
mode:
authorWilliButz <WilliButz@users.noreply.github.com>2017-09-18 16:59:50 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2017-09-18 16:59:50 +0200
commit0b2d9bbbd25856aab2faec08b79e07f1ef9ca002 (patch)
treef375d0887f166e4fe88c104155cf45ba14483664 /nixos/tests/grafana.nix
parent4850bc70808bc2824c977877f9cf38440ccfe383 (diff)
downloadnixpkgs-0b2d9bbbd25856aab2faec08b79e07f1ef9ca002.tar
nixpkgs-0b2d9bbbd25856aab2faec08b79e07f1ef9ca002.tar.gz
nixpkgs-0b2d9bbbd25856aab2faec08b79e07f1ef9ca002.tar.bz2
nixpkgs-0b2d9bbbd25856aab2faec08b79e07f1ef9ca002.tar.lz
nixpkgs-0b2d9bbbd25856aab2faec08b79e07f1ef9ca002.tar.xz
nixpkgs-0b2d9bbbd25856aab2faec08b79e07f1ef9ca002.tar.zst
nixpkgs-0b2d9bbbd25856aab2faec08b79e07f1ef9ca002.zip
nixos/tests: add grafana test (#29531)
Diffstat (limited to 'nixos/tests/grafana.nix')
-rw-r--r--nixos/tests/grafana.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/nixos/tests/grafana.nix b/nixos/tests/grafana.nix
new file mode 100644
index 00000000000..16b8181498a
--- /dev/null
+++ b/nixos/tests/grafana.nix
@@ -0,0 +1,25 @@
+import ./make-test.nix ({ lib, ... }:
+{
+  name = "grafana";
+
+  meta = with lib.maintainers; {
+    maintainers = [ willibutz ];
+  };
+
+  machine = { config, pkgs, ... }: {
+    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);
+    $machine->succeed("curl -sS http://127.0.0.1:3000/");
+  '';
+})