From 4ad703d62e7c1a1817262c31c09494864aea8d9c Mon Sep 17 00:00:00 2001 From: netali Date: Fri, 29 Dec 2023 04:21:25 +0100 Subject: [PATCH] nixos/tests/zammad: refactor test --- nixos/tests/zammad.nix | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/nixos/tests/zammad.nix b/nixos/tests/zammad.nix index aaf32c6f13fe..c799a2958003 100644 --- a/nixos/tests/zammad.nix +++ b/nixos/tests/zammad.nix @@ -15,34 +15,6 @@ import ./make-test-python.nix ( services.zammad.secretKeyBaseFile = pkgs.writeText "secret" '' 52882ef142066e09ab99ce816ba72522e789505caba224a52d750ec7dc872c2c371b2fd19f16b25dfbdd435a4dd46cb3df9f82eb63fafad715056bdfe25740d6 ''; - - systemd.services.zammad-locale-cheat = - let cfg = config.services.zammad; in - { - serviceConfig = { - Type = "oneshot"; - Restart = "on-failure"; - - User = "zammad"; - Group = "zammad"; - PrivateTmp = true; - StateDirectory = "zammad"; - WorkingDirectory = cfg.dataDir; - }; - wantedBy = [ "zammad-web.service" ]; - description = "Hack in the locale files so zammad doesn't try to access the internet"; - script = '' - mkdir -p ./config/translations - VERSION=$(cat ${cfg.package}/VERSION) - - # If these files are not in place, zammad will try to access the internet. - # For the test, we only need to supply en-us. - echo '[{"locale":"en-us","alias":"en","name":"English (United States)","active":true,"dir":"ltr"}]' \ - > ./config/locales-$VERSION.yml - echo '[{"locale":"en-us","format":"time","source":"date","target":"mm/dd/yyyy","target_initial":"mm/dd/yyyy"},{"locale":"en-us","format":"time","source":"timestamp","target":"mm/dd/yyyy HH:MM","target_initial":"mm/dd/yyyy HH:MM"}]' \ - > ./config/translations/en-us-$VERSION.yml - ''; - }; }; testScript = ''