1 import ./make-test-python.nix ({ pkgs, ... }: {
4 meta.maintainers = with pkgs.lib.maintainers; [ evenbrenden ];
6 nodes.machine = { pkgs, ... }: {
7 services.jotta-cli.enable = true;
8 imports = [ ./common/user-account.nix ];
11 testScript = { nodes, ... }:
12 let uid = toString nodes.machine.users.users.alice.uid;
16 machine.succeed("loginctl enable-linger alice")
17 machine.wait_for_unit("user@${uid}.service")
19 machine.wait_for_unit("jottad.service", "alice")
20 machine.wait_for_open_unix_socket("/run/user/${uid}/jottad/jottad.socket")
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"')