nixos/tests/ersatz: migrate to runTest

This commit is contained in:
James Hollowell
2025-11-30 16:39:19 -05:00
parent cbdcce5d67
commit ca4316aadf
2 changed files with 17 additions and 19 deletions

View File

@@ -522,7 +522,7 @@ in
};
ergo = runTest ./ergo.nix;
ergochat = runTest ./ergochat.nix;
ersatztv = handleTest ./ersatztv.nix { };
ersatztv = runTest ./ersatztv.nix;
espanso = import ./espanso.nix {
inherit (pkgs) lib;
inherit runTest;

View File

@@ -1,21 +1,19 @@
import ./make-test-python.nix (
{ lib, ... }:
{ lib, ... }:
{
name = "ersatztv";
meta.maintainers = with lib.maintainers; [ allout58 ];
{
name = "ersatztv";
meta.maintainers = with lib.maintainers; [ allout58 ];
nodes.machine =
{ ... }:
{
services.ersatztv.enable = true;
};
nodes.machine =
{ ... }:
{
services.ersatztv.enable = true;
};
# ErsatzTV doesn't really have an API to speak of currently, so just check if it responds at all
testScript = ''
machine.wait_for_unit("ersatztv.service")
machine.wait_for_open_port(8409)
machine.succeed("curl --fail http://localhost:8409/")
'';
}
)
# ErsatzTV doesn't really have an API to speak of currently, so just check if it responds at all
testScript = ''
machine.wait_for_unit("ersatztv.service")
machine.wait_for_open_port(8409)
machine.succeed("curl --fail http://localhost:8409/")
'';
}