lol

nixosTests.zammad: migrate to runTest

Part Of #386873

+33 -37
+1 -1
nixos/tests/all-tests.nix
··· 1302 1302 ydotool = handleTest ./ydotool.nix {}; 1303 1303 yggdrasil = handleTest ./yggdrasil.nix {}; 1304 1304 your_spotify = handleTest ./your_spotify.nix {}; 1305 - zammad = handleTest ./zammad.nix {}; 1305 + zammad = runTest ./zammad.nix; 1306 1306 zenohd = runTest ./zenohd.nix; 1307 1307 zeronet-conservancy = runTest ./zeronet-conservancy.nix; 1308 1308 zfs = handleTest ./zfs.nix {};
+32 -36
nixos/tests/zammad.nix
··· 1 - import ./make-test-python.nix ( 2 - { lib, pkgs, ... }: 1 + { lib, pkgs, ... }: 3 2 4 - { 5 - name = "zammad"; 3 + { 4 + name = "zammad"; 6 5 7 - meta.maintainers = with lib.maintainers; [ 8 - taeer 9 - netali 10 - ]; 6 + meta.maintainers = with lib.maintainers; [ 7 + taeer 8 + netali 9 + ]; 11 10 12 - nodes.machine = 13 - { config, ... }: 14 - { 15 - virtualisation = { 16 - memorySize = 2048; 17 - }; 11 + nodes.machine = { 12 + virtualisation = { 13 + memorySize = 2048; 14 + }; 18 15 19 - services.zammad.enable = true; 20 - services.zammad.secretKeyBaseFile = pkgs.writeText "secret" '' 21 - 52882ef142066e09ab99ce816ba72522e789505caba224a52d750ec7dc872c2c371b2fd19f16b25dfbdd435a4dd46cb3df9f82eb63fafad715056bdfe25740d6 22 - ''; 23 - }; 16 + services.zammad.enable = true; 17 + services.zammad.secretKeyBaseFile = pkgs.writeText "secret" '' 18 + 52882ef142066e09ab99ce816ba72522e789505caba224a52d750ec7dc872c2c371b2fd19f16b25dfbdd435a4dd46cb3df9f82eb63fafad715056bdfe25740d6 19 + ''; 20 + }; 24 21 25 - testScript = '' 26 - start_all() 27 - machine.wait_for_unit("postgresql.service") 28 - machine.wait_for_unit("redis-zammad.service") 29 - machine.wait_for_unit("zammad-web.service") 30 - machine.wait_for_unit("zammad-websocket.service") 31 - machine.wait_for_unit("zammad-worker.service") 32 - # wait for zammad to fully come up 33 - machine.sleep(120) 22 + testScript = '' 23 + start_all() 24 + machine.wait_for_unit("postgresql.service") 25 + machine.wait_for_unit("redis-zammad.service") 26 + machine.wait_for_unit("zammad-web.service") 27 + machine.wait_for_unit("zammad-websocket.service") 28 + machine.wait_for_unit("zammad-worker.service") 29 + # wait for zammad to fully come up 30 + machine.sleep(120) 34 31 35 - # without the grep the command does not produce valid utf-8 for some reason 36 - with subtest("welcome screen loads"): 37 - machine.succeed( 38 - "curl -sSfL http://localhost:3000/ | grep '<title>Zammad Helpdesk</title>'" 39 - ) 40 - ''; 41 - } 42 - ) 32 + # without the grep the command does not produce valid utf-8 for some reason 33 + with subtest("welcome screen loads"): 34 + machine.succeed( 35 + "curl -sSfL http://localhost:3000/ | grep '<title>Zammad Helpdesk</title>'" 36 + ) 37 + ''; 38 + }