nixos/test: fix prometheus-{bind,varnish}-exporter tests
This commit is contained in:
parent
95be462d07
commit
01ee2ee2ba
@ -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 \
|
||||||
|
@ -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'");
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user