summary refs log tree commit diff
path: root/nixos/tests/graphite.nix
diff options
context:
space:
mode:
authorBas van Dijk <v.dijk.bas@gmail.com>2017-09-30 21:12:24 +0200
committerBas van Dijk <v.dijk.bas@gmail.com>2017-10-08 03:03:22 +0200
commit5b8ff5ed4914642027422dd1956f2068cfbe95fd (patch)
tree97ef152777a311477dd8fdb446f8a57dd2b20a54 /nixos/tests/graphite.nix
parent3fe7cddc304abb86e61a750a4f807270c7ca7825 (diff)
downloadnixpkgs-5b8ff5ed4914642027422dd1956f2068cfbe95fd.tar
nixpkgs-5b8ff5ed4914642027422dd1956f2068cfbe95fd.tar.gz
nixpkgs-5b8ff5ed4914642027422dd1956f2068cfbe95fd.tar.bz2
nixpkgs-5b8ff5ed4914642027422dd1956f2068cfbe95fd.tar.lz
nixpkgs-5b8ff5ed4914642027422dd1956f2068cfbe95fd.tar.xz
nixpkgs-5b8ff5ed4914642027422dd1956f2068cfbe95fd.tar.zst
nixpkgs-5b8ff5ed4914642027422dd1956f2068cfbe95fd.zip
graphite: 0.9.15 -> 1.0.2
Fixes: #29961

Also added the option:

  services.graphite.web.extraConfig

for configuring graphite_web.
Diffstat (limited to 'nixos/tests/graphite.nix')
-rw-r--r--nixos/tests/graphite.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/nixos/tests/graphite.nix b/nixos/tests/graphite.nix
new file mode 100644
index 00000000000..4fd7de192d5
--- /dev/null
+++ b/nixos/tests/graphite.nix
@@ -0,0 +1,26 @@
+import ./make-test.nix ({ pkgs, ...} :
+{
+  name = "graphite";
+  nodes = {
+    one =
+      { config, pkgs, ... }: {
+        services.graphite = {
+          web = {
+            enable = true;
+          };
+          carbon = {
+            enableCache = true;
+          };
+        };
+      };
+    };
+
+  testScript = ''
+    startAll;
+    $one->waitForUnit("default.target");
+    $one->requireActiveUnit("graphiteWeb.service");
+    $one->requireActiveUnit("carbonCache.service");
+    $one->succeed("echo \"foo 1 `date +%s`\" | nc -q0 localhost 2003");
+    $one->waitUntilSucceeds("curl 'http://localhost:8080/metrics/find/?query=foo&format=treejson' --silent | grep foo")
+  '';
+})