librechat-oci: nixos module and test
Some checks failed
Flake check / flake-check (pull_request) Failing after 2m34s
Some checks failed
Flake check / flake-check (pull_request) Failing after 2m34s
This commit is contained in:
parent
f3c63493ab
commit
68fcf86b97
4 changed files with 288 additions and 9 deletions
38
tests/run/librechat-oci.nix
Normal file
38
tests/run/librechat-oci.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
let
|
||||
port = 3080;
|
||||
in
|
||||
{
|
||||
name = "librechat-oci-test";
|
||||
|
||||
nodes.machine =
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
../../modules/nixos/librechat-oci
|
||||
];
|
||||
|
||||
config = {
|
||||
virtualisation.diskSize = 32768;
|
||||
virtualisation.memorySize = 8192;
|
||||
|
||||
services.librechat-oci = {
|
||||
enable = true;
|
||||
inherit port;
|
||||
};
|
||||
|
||||
networking.firewall.enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
machine.wait_for_unit("default.target")
|
||||
|
||||
machine.wait_for_unit("podman-librechat-mongodb.service")
|
||||
machine.wait_for_unit("podman-librechat.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