nixos/test: init omnom
This commit is contained in:
parent
19c1b4250c
commit
56c4e8b5b5
@ -1008,6 +1008,7 @@ in
|
||||
ollama-cuda = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./ollama-cuda.nix;
|
||||
ollama-rocm = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./ollama-rocm.nix;
|
||||
ombi = runTest ./ombi.nix;
|
||||
omnom = runTest ./omnom.nix;
|
||||
openarena = runTest ./openarena.nix;
|
||||
openbao = runTest ./openbao.nix;
|
||||
opencloud = runTest ./opencloud.nix;
|
||||
|
42
nixos/tests/omnom.nix
Normal file
42
nixos/tests/omnom.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
servicePort = 9090;
|
||||
in
|
||||
{
|
||||
name = "Basic Omnom Test";
|
||||
meta = {
|
||||
maintainers = lib.teams.ngi.members;
|
||||
};
|
||||
|
||||
nodes = {
|
||||
server =
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
services.omnom = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
|
||||
port = servicePort;
|
||||
|
||||
settings = {
|
||||
app = {
|
||||
disable_signup = false; # restrict CLI user-creation
|
||||
results_per_page = 50;
|
||||
};
|
||||
server.address = "0.0.0.0:${toString servicePort}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: take a snapshot
|
||||
testScript =
|
||||
{ nodes, ... }:
|
||||
# python
|
||||
''
|
||||
server.start()
|
||||
server.wait_for_unit("omnom.service")
|
||||
server.wait_for_open_port(${toString servicePort})
|
||||
server.succeed("curl -sf http://localhost:${toString servicePort}")
|
||||
'';
|
||||
}
|
@ -4,6 +4,7 @@
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
makeWrapper,
|
||||
nixosTests,
|
||||
|
||||
# for addons
|
||||
buildNpmPackage,
|
||||
@ -77,6 +78,8 @@ buildGoModule (finalAttrs: {
|
||||
cp config.yml_sample $out/share/examples/config.yml
|
||||
'';
|
||||
|
||||
passthru.tests = nixosTests.omnom;
|
||||
|
||||
meta = {
|
||||
description = "Webpage bookmarking and snapshotting service";
|
||||
homepage = "https://github.com/asciimoo/omnom";
|
||||
|
Loading…
x
Reference in New Issue
Block a user