about summary refs log tree commit diff
diff options
context:
space:
mode:
authorteutat3s <10206665+teutat3s@users.noreply.github.com>2023-05-19 21:49:55 +0200
committerteutat3s <10206665+teutat3s@users.noreply.github.com>2023-05-19 21:49:55 +0200
commit1d556fd9f3de6404bf57bf57a503381e52d2bd30 (patch)
tree55e3e546dc3edfc602eef97d584ac8116d0ed9d7
parent48a0fb7aab511df92a17cf239c37f2bd2ec9ae3a (diff)
downloadnixlib-1d556fd9f3de6404bf57bf57a503381e52d2bd30.tar
nixlib-1d556fd9f3de6404bf57bf57a503381e52d2bd30.tar.gz
nixlib-1d556fd9f3de6404bf57bf57a503381e52d2bd30.tar.bz2
nixlib-1d556fd9f3de6404bf57bf57a503381e52d2bd30.tar.lz
nixlib-1d556fd9f3de6404bf57bf57a503381e52d2bd30.tar.xz
nixlib-1d556fd9f3de6404bf57bf57a503381e52d2bd30.tar.zst
nixlib-1d556fd9f3de6404bf57bf57a503381e52d2bd30.zip
nixosTests.prometheus-exporters.json: fix test script
Upstream changed the config format in https://github.com/prometheus-community/json_exporter/pull/146
-rw-r--r--nixos/tests/prometheus-exporters.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix
index adc2b467be51..bb87f1a3df9b 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 = {