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 = { serviceOpts = {
path = [ pkgs.varnish ]; path = [ pkgs.varnish ];
serviceConfig = { serviceConfig = {
DynamicUser = true;
RestartSec = mkDefault 1; RestartSec = mkDefault 1;
ExecStart = '' ExecStart = ''
${pkgs.prometheus-varnish-exporter}/bin/prometheus_varnish_exporter \ ${pkgs.prometheus-varnish-exporter}/bin/prometheus_varnish_exporter \

View File

@ -73,7 +73,7 @@ let
exporterTest = '' exporterTest = ''
waitForUnit("prometheus-bind-exporter.service"); waitForUnit("prometheus-bind-exporter.service");
waitForOpenPort(9119); 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 = '' exporterTest = ''
waitForUnit("prometheus-varnish-exporter.service"); waitForUnit("prometheus-varnish-exporter.service");
waitForOpenPort(6081);
waitForOpenPort(9131); waitForOpenPort(9131);
succeed("curl -sSf http://localhost:9131/metrics | grep -q 'varnish_up 1'"); succeed("curl -sSf http://localhost:9131/metrics | grep -q 'varnish_up 1'");
''; '';