1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-27 16:11:58 +00:00
nixpkgs/nixos/tests/graphite.nix
2017-10-31 15:49:59 +01:00

33 lines
945 B
Nix

import ./make-test.nix ({ pkgs, ...} :
{
name = "graphite";
nodes = {
one =
{ config, pkgs, ... }: {
time.timeZone = "UTC";
services.graphite = {
web.enable = true;
api = {
enable = true;
port = 8082;
};
carbon.enableCache = true;
seyren.enable = true;
pager.enable = true;
};
};
};
testScript = ''
startAll;
$one->waitForUnit("default.target");
$one->requireActiveUnit("graphiteWeb.service");
$one->requireActiveUnit("graphiteApi.service");
$one->requireActiveUnit("graphitePager.service");
$one->requireActiveUnit("carbonCache.service");
$one->requireActiveUnit("seyren.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")
'';
})