about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2023-10-18 00:06:26 +0200
committerFelix Buehler <account@buehler.rocks>2023-11-07 20:56:32 +0100
commit4d1680ccc7a340829a8d0f93ca7d4405c48cf115 (patch)
tree36116efa1c8517426f9119a77ba795c0570620ef /nixos/tests
parenta8e6f0a81a99c613512082be3588c62f0aa614c0 (diff)
nixos/exportarr: init
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/prometheus-exporters.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix
index 7fd824967206f..bf222f60c2189 100644
--- a/nixos/tests/prometheus-exporters.nix
+++ b/nixos/tests/prometheus-exporters.nix
@@ -257,6 +257,21 @@ let
       '';
     };
 
+    exportarr-sonarr = {
+      nodeName = "exportarr_sonarr";
+      exporterConfig = {
+        enable = true;
+        url = "http://127.0.0.1:8989";
+        # testing for real data is tricky, because the api key can not be preconfigured
+        apiKeyFile = pkgs.writeText "dummy-api-key" "eccff6a992bc2e4b88e46d064b26bb4e";
+      };
+      exporterTest = ''
+        wait_for_unit("prometheus-exportarr-sonarr-exporter.service")
+        wait_for_open_port(9707)
+        succeed("curl -sSf 'http://localhost:9707/metrics")
+      '';
+    };
+
     fastly = {
       exporterConfig = {
         enable = true;