nixos/test: fix prometheus-{bind,varnish}-exporter tests

This commit is contained in:
WilliButz 2019-07-17 14:17:58 +02:00
parent 95be462d07
commit 01ee2ee2ba
No known key found for this signature in database
GPG key ID: 92582A10F1179CB2
2 changed files with 2 additions and 2 deletions

View file

@ -68,7 +68,6 @@ in
serviceOpts = {
path = [ pkgs.varnish ];
serviceConfig = {
DynamicUser = true;
RestartSec = mkDefault 1;
ExecStart = ''
${pkgs.prometheus-varnish-exporter}/bin/prometheus_varnish_exporter \

View file

@ -73,7 +73,7 @@ let
exporterTest = ''
waitForUnit("prometheus-bind-exporter.service");
waitForOpenPort(9119);
succeed("curl -sSf http://localhost:9119/metrics" | grep -q 'bind_query_recursions_total 0');
succeed("curl -sSf http://localhost:9119/metrics | grep -q 'bind_query_recursions_total 0'");
'';
};
@ -311,6 +311,7 @@ let
};
exporterTest = ''
waitForUnit("prometheus-varnish-exporter.service");
waitForOpenPort(6081);
waitForOpenPort(9131);
succeed("curl -sSf http://localhost:9131/metrics | grep -q 'varnish_up 1'");
'';