nixosTests.agate: Use module based runner
This commit is contained in:
parent
15dcbc2514
commit
5727fd3e6f
2 changed files with 23 additions and 25 deletions
|
@ -48,7 +48,7 @@ in {
|
|||
acme = runTest ./acme.nix;
|
||||
adguardhome = runTest ./adguardhome.nix;
|
||||
aesmd = runTest ./aesmd.nix;
|
||||
agate = handleTest ./web-servers/agate.nix {};
|
||||
agate = runTest ./web-servers/agate.nix;
|
||||
agda = handleTest ./agda.nix {};
|
||||
airsonic = handleTest ./airsonic.nix {};
|
||||
allTerminfo = handleTest ./all-terminfo.nix {};
|
||||
|
|
|
@ -1,29 +1,27 @@
|
|||
import ../make-test-python.nix (
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
name = "agate";
|
||||
meta = with lib.maintainers; { maintainers = [ jk ]; };
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
name = "agate";
|
||||
meta = with lib.maintainers; { maintainers = [ jk ]; };
|
||||
|
||||
nodes = {
|
||||
geminiserver = { pkgs, ... }: {
|
||||
services.agate = {
|
||||
enable = true;
|
||||
hostnames = [ "localhost" ];
|
||||
contentDir = pkgs.writeTextDir "index.gmi" ''
|
||||
# Hello NixOS!
|
||||
'';
|
||||
};
|
||||
nodes = {
|
||||
geminiserver = { pkgs, ... }: {
|
||||
services.agate = {
|
||||
enable = true;
|
||||
hostnames = [ "localhost" ];
|
||||
contentDir = pkgs.writeTextDir "index.gmi" ''
|
||||
# Hello NixOS!
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = { nodes, ... }: ''
|
||||
geminiserver.wait_for_unit("agate")
|
||||
geminiserver.wait_for_open_port(1965)
|
||||
testScript = { nodes, ... }: ''
|
||||
geminiserver.wait_for_unit("agate")
|
||||
geminiserver.wait_for_open_port(1965)
|
||||
|
||||
with subtest("check is serving over gemini"):
|
||||
response = geminiserver.succeed("${pkgs.gmni}/bin/gmni -j once -i -N gemini://localhost:1965")
|
||||
print(response)
|
||||
assert "Hello NixOS!" in response
|
||||
'';
|
||||
}
|
||||
)
|
||||
with subtest("check is serving over gemini"):
|
||||
response = geminiserver.succeed("${pkgs.gmni}/bin/gmni -j once -i -N gemini://localhost:1965")
|
||||
print(response)
|
||||
assert "Hello NixOS!" in response
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue