mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-20 12:42:24 +00:00
5b8ff5ed49
Fixes: #29961 Also added the option: services.graphite.web.extraConfig for configuring graphite_web.
27 lines
675 B
Nix
27 lines
675 B
Nix
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")
|
|
'';
|
|
})
|