mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 15:36:47 +03:00
nixos/test: fix prometheus-{bind,varnish}-exporter tests
This commit is contained in:
parent
95be462d07
commit
01ee2ee2ba
@ -68,7 +68,6 @@ in
|
||||
serviceOpts = {
|
||||
path = [ pkgs.varnish ];
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
RestartSec = mkDefault 1;
|
||||
ExecStart = ''
|
||||
${pkgs.prometheus-varnish-exporter}/bin/prometheus_varnish_exporter \
|
||||
|
@ -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'");
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user