at 24.11-pre 807 B view raw
1import ./make-test-python.nix ({ pkgs, ... }: { 2 3 name = "jotta-cli"; 4 meta.maintainers = with pkgs.lib.maintainers; [ evenbrenden ]; 5 6 nodes.machine = { pkgs, ... }: { 7 services.jotta-cli.enable = true; 8 imports = [ ./common/user-account.nix ]; 9 }; 10 11 testScript = { nodes, ... }: 12 let uid = toString nodes.machine.users.users.alice.uid; 13 in '' 14 machine.start() 15 16 machine.succeed("loginctl enable-linger alice") 17 machine.wait_for_unit("user@${uid}.service") 18 19 machine.wait_for_unit("jottad.service", "alice") 20 machine.wait_for_open_unix_socket("/run/user/${uid}/jottad/jottad.socket") 21 22 # "jotta-cli version" should fail if jotta-cli cannot connect to jottad 23 machine.succeed('XDG_RUNTIME_DIR=/run/user/${uid} su alice -c "jotta-cli version"') 24 ''; 25})