open-webui-oci: replace version with image option
This commit is contained in:
parent
7b54ef433e
commit
9a400d96d1
4 changed files with 76 additions and 8 deletions
37
tests/run/open-webui-oci.nix
Normal file
37
tests/run/open-webui-oci.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
let
|
||||
port = 3000;
|
||||
in
|
||||
{
|
||||
name = "open-webui-oci-test";
|
||||
|
||||
nodes.machine =
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
../../modules/nixos/open-webui-oci
|
||||
];
|
||||
|
||||
config = {
|
||||
virtualisation.diskSize = 32768;
|
||||
virtualisation.memorySize = 8192;
|
||||
|
||||
services.open-webui-oci = {
|
||||
enable = true;
|
||||
inherit port;
|
||||
};
|
||||
|
||||
networking.firewall.enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
machine.wait_for_unit("default.target")
|
||||
|
||||
machine.wait_for_unit("podman-open-webui.service")
|
||||
machine.wait_for_open_port(${toString port})
|
||||
|
||||
machine.succeed("curl --fail --retry 10 --retry-delay 5 --retry-connrefused http://localhost:${toString port}/")
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue