From 01ee2ee2ba5b1d4763c77a6ed46523c17df97167 Mon Sep 17 00:00:00 2001 From: WilliButz Date: Wed, 17 Jul 2019 14:17:58 +0200 Subject: [PATCH] nixos/test: fix prometheus-{bind,varnish}-exporter tests --- .../services/monitoring/prometheus/exporters/varnish.nix | 1 - nixos/tests/prometheus-exporters.nix | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/monitoring/prometheus/exporters/varnish.nix b/nixos/modules/services/monitoring/prometheus/exporters/varnish.nix index aaed76175b84..924689dc994b 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/varnish.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/varnish.nix @@ -68,7 +68,6 @@ in serviceOpts = { path = [ pkgs.varnish ]; serviceConfig = { - DynamicUser = true; RestartSec = mkDefault 1; ExecStart = '' ${pkgs.prometheus-varnish-exporter}/bin/prometheus_varnish_exporter \ diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index 9a85501d15f8..fb01b5018214 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -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'"); '';