From 1d556fd9f3de6404bf57bf57a503381e52d2bd30 Mon Sep 17 00:00:00 2001 From: teutat3s <10206665+teutat3s@users.noreply.github.com> Date: Fri, 19 May 2023 21:49:55 +0200 Subject: [PATCH] nixosTests.prometheus-exporters.json: fix test script Upstream changed the config format in https://github.com/prometheus-community/json_exporter/pull/146 --- nixos/tests/prometheus-exporters.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index adc2b467be5..bb87f1a3df9 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -348,9 +348,13 @@ let enable = true; url = "http://localhost"; configFile = pkgs.writeText "json-exporter-conf.json" (builtins.toJSON { - metrics = [ - { name = "json_test_metric"; path = "{ .test }"; } - ]; + modules = { + default = { + metrics = [ + { name = "json_test_metric"; path = "{ .test }"; } + ]; + }; + }; }); }; metricProvider = {