nixpkgs/nixos/tests/filebrowser.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
529 B
Nix
Raw Normal View History

2025-05-28 21:13:33 +02:00
{
name = "filebrowser";
nodes.machine = {
services.filebrowser = {
enable = true;
settings = {
address = "localhost";
port = 8080;
database = "/var/lib/filebrowser/filebrowser.db";
};
};
};
testScript = ''
machine.start()
machine.wait_for_unit("filebrowser.service")
machine.wait_for_open_port(8080)
machine.succeed("curl --fail http://localhost:8080/")
machine.succeed("stat /var/lib/filebrowser/filebrowser.db")
machine.shutdown()
'';
}