From 13a90f1ad402c40185ebc03cfd82e7e95f8f629f Mon Sep 17 00:00:00 2001 From: ibizaman Date: Sun, 3 Dec 2023 21:42:09 -0800 Subject: [PATCH] avoid testing nix store path hash which makes tests brittle --- test/modules/arr.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/modules/arr.nix b/test/modules/arr.nix index 9c0bd57..60a3677 100644 --- a/test/modules/arr.nix +++ b/test/modules/arr.nix @@ -28,8 +28,11 @@ let m ]; }).config; + + systemdRedacted = lib.filterAttrsRecursive (n: v: n != "preStart") cfg.systemd; in { - inherit (cfg) systemd services users; + inherit (cfg) services users; + systemd = systemdRedacted; shb = { inherit (cfg.shb) backup nginx; }; }; in @@ -54,7 +57,6 @@ in testRadarr = { expected = { systemd.services.radarr = { - preStart = "ln -fs /nix/store/z7gk6xfj51sr1n1bjj6lsadjrwjxzc5d--config.xml /var/lib/radarr/config.xml.template\nrm /var/lib/radarr/config.xml || :\nsed -e \"s|%APIKEY%|$(cat /run/radarr/apikey)|\" /var/lib/radarr/config.xml.template > /var/lib/radarr/config.xml\n"; serviceConfig = { StateDirectoryMode = "0750"; UMask = "0027"; @@ -122,7 +124,6 @@ in testRadarrWithBackup = { expected = { systemd.services.radarr = { - preStart = "ln -fs /nix/store/z7gk6xfj51sr1n1bjj6lsadjrwjxzc5d--config.xml /var/lib/radarr/config.xml.template\nrm /var/lib/radarr/config.xml || :\nsed -e \"s|%APIKEY%|$(cat /run/radarr/apikey)|\" /var/lib/radarr/config.xml.template > /var/lib/radarr/config.xml\n"; serviceConfig = { StateDirectoryMode = "0750"; UMask = "0027";