1 import ../make-test-python.nix ({ pkgs, lib, ... }: {
4 meta = with pkgs.lib.maintainers; {
5 maintainers = [ jnsgruk ];
8 nodes.machine = { lib, ... }: {
14 environment.systemPackages = [ pkgs.curl ];
18 machine.wait_for_unit("sockets.target")
19 machine.wait_for_unit("lxd.service")
20 machine.wait_for_file("/var/lib/lxd/unix.socket")
22 # Wait for lxd to settle
23 machine.succeed("lxd waitready")
25 # Configure LXC listen address
26 machine.succeed("lxc config set core.https_address :8443")
27 machine.succeed("systemctl restart lxd")
29 # Check that the LXD_UI environment variable is populated in the systemd unit
30 machine.succeed("cat /etc/systemd/system/lxd.service | grep 'LXD_UI'")
32 # Ensure the endpoint returns an HTML page with 'LXD UI' in the title
33 machine.succeed("curl -kLs https://localhost:8443/ui | grep '<title>LXD UI</title>'")