nixosTests.gemstash: handleTest -> runTest

This commit is contained in:
Sizhe Zhao 2025-06-07 22:00:52 +08:00
commit 503a6ed79d
No known key found for this signature in database
GPG key ID: ED1807251A7DA08F
2 changed files with 17 additions and 33 deletions

View file

@ -580,7 +580,7 @@ in
};
gatus = runTest ./gatus.nix;
getaddrinfo = runTest ./getaddrinfo.nix;
gemstash = handleTest ./gemstash.nix { };
gemstash = import ./gemstash.nix { inherit pkgs runTest; };
geoclue2 = runTest ./geoclue2.nix;
geoserver = runTest ./geoserver.nix;
gerrit = runTest ./gerrit.nix;

View file

@ -1,29 +1,15 @@
{
system ? builtins.currentSystem,
config ? { },
pkgs ? import ../.. { inherit system config; },
}:
with import ../lib/testing-python.nix { inherit system pkgs; };
with pkgs.lib;
{ runTest, pkgs }:
let
common_meta = {
maintainers = [ maintainers.viraptor ];
};
inherit (pkgs) lib;
in
{
gemstash_works = makeTest {
gemstash_works = runTest {
name = "gemstash-works";
meta = common_meta;
meta.maintainers = with lib.maintainers; [ viraptor ];
nodes.machine =
{ config, pkgs, ... }:
{
services.gemstash = {
enable = true;
};
};
nodes.machine = {
services.gemstash.enable = true;
};
# gemstash responds to http requests
testScript = ''
@ -34,21 +20,19 @@ in
'';
};
gemstash_custom_port = makeTest {
gemstash_custom_port = runTest {
name = "gemstash-custom-port";
meta = common_meta;
meta.maintainers = with lib.maintainers; [ viraptor ];
nodes.machine =
{ config, pkgs, ... }:
{
services.gemstash = {
enable = true;
openFirewall = true;
settings = {
bind = "tcp://0.0.0.0:12345";
};
nodes.machine = {
services.gemstash = {
enable = true;
openFirewall = true;
settings = {
bind = "tcp://0.0.0.0:12345";
};
};
};
# gemstash responds to http requests
testScript = ''