nixosTests.nagios: handleTest -> runTest

This commit is contained in:
Sizhe Zhao 2025-07-09 00:42:32 +08:00
parent 7b09056b8f
commit f253690f02
No known key found for this signature in database
GPG Key ID: ED1807251A7DA08F
2 changed files with 111 additions and 115 deletions

View File

@ -912,7 +912,7 @@ in
mysql-backup = handleTest ./mysql/mysql-backup.nix { };
mysql-replication = handleTest ./mysql/mysql-replication.nix { };
n8n = runTest ./n8n.nix;
nagios = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./nagios.nix { };
nagios = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./nagios.nix;
nar-serve = runTest ./nar-serve.nix;
nat.firewall = handleTest ./nat.nix { withFirewall = true; };
nat.standalone = handleTest ./nat.nix { withFirewall = false; };

View File

@ -1,13 +1,12 @@
import ./make-test-python.nix (
{ pkgs, ... }:
{ lib, ... }:
{
name = "nagios";
meta = with pkgs.lib.maintainers; {
meta = with lib.maintainers; {
maintainers = [ symphorien ];
};
nodes.machine =
{ lib, ... }:
{ pkgs, ... }:
let
writer = pkgs.writeShellScript "write" ''
set -x
@ -92,9 +91,7 @@ import ./make-test-python.nix (
};
};
testScript =
{ ... }:
''
testScript = ''
with subtest("ensure sshd starts"):
machine.wait_for_unit("sshd.service")
@ -121,4 +118,3 @@ import ./make-test-python.nix (
assert_notify("ssh is OK")
'';
}
)