at 23.11-pre 1.2 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 networking.extraHosts = '' 10 127.0.0.1 all.api.radio-browser.info 11 ''; 12 13 services.murmur = { 14 enable = true; 15 registerName = "NixOS tests"; 16 }; 17 18 services.botamusique = { 19 enable = true; 20 settings = { 21 server = { 22 channel = "NixOS tests"; 23 }; 24 bot = { 25 version = false; 26 auto_check_update = false; 27 }; 28 }; 29 }; 30 }; 31 }; 32 33 testScript = '' 34 start_all() 35 36 machine.wait_for_unit("murmur.service") 37 machine.wait_for_unit("botamusique.service") 38 39 machine.sleep(10) 40 41 machine.wait_until_succeeds( 42 "journalctl -u murmur.service -e | grep -q '<1:botamusique(-1)> Authenticated'" 43 ) 44 45 with subtest("Check systemd hardening"): 46 output = machine.execute("systemctl show botamusique.service")[1] 47 machine.log(output) 48 output = machine.execute("systemd-analyze security botamusique.service")[1] 49 machine.log(output) 50 ''; 51})