{ pkgs, module }: pkgs.testers.runNixOSTest { name = "allmende"; nodes.machine = { imports = [ module ]; services.allmende = { enable = true; # No regions: the owner chooses the first one in the browser (see below). openFirewall = true; }; }; testScript = '' machine.wait_for_unit("multi-user.target") with subtest("the service waits for setup instead of failing"): machine.succeed("systemctl show allmende -p ActiveState | grep -q inactive") machine.fail("systemctl is-failed allmende") with subtest("init creates the identity, as the service's own user"): # The VM's shell is a terminal, where init would wait for the phrase to be # typed back; empty input makes it skip that check, as in a script. out = machine.succeed("allmende-admin init