mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
@@ -974,6 +974,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 = handleTest ./ombi.nix { };
|
||||
omnom = runTest ./omnom.nix;
|
||||
openarena = handleTest ./openarena.nix { };
|
||||
openbao = runTest ./openbao.nix;
|
||||
openldap = handleTest ./openldap.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 = "A webpage bookmarking and snapshotting service";
|
||||
homepage = "https://github.com/asciimoo/omnom";
|
||||
|
||||
Reference in New Issue
Block a user