at 22.05-pre 1.1 kB view raw
1import ./make-test-python.nix ({ pkgs, lib, ...} : 2 3{ 4 name = "botamusique"; 5 meta.maintainers = with lib.maintainers; [ hexa ]; 6 7 nodes = { 8 machine = { config, ... }: { 9 services.murmur = { 10 enable = true; 11 registerName = "NixOS tests"; 12 }; 13 14 services.botamusique = { 15 enable = true; 16 settings = { 17 server = { 18 channel = "NixOS tests"; 19 }; 20 bot = { 21 version = false; 22 auto_check_update = false; 23 }; 24 }; 25 }; 26 }; 27 }; 28 29 testScript = '' 30 start_all() 31 32 machine.wait_for_unit("murmur.service") 33 machine.wait_for_unit("botamusique.service") 34 35 machine.sleep(10) 36 37 machine.wait_until_succeeds( 38 "journalctl -u murmur.service -e | grep -q '<1:botamusique(-1)> Authenticated'" 39 ) 40 41 with subtest("Check systemd hardening"): 42 output = machine.execute("systemctl show botamusique.service")[1] 43 machine.log(output) 44 output = machine.execute("systemd-analyze security botamusique.service")[1] 45 machine.log(output) 46 ''; 47})