nixpkgs/nixos/tests/keter.nix
Jappie Klooster 3f2f5bea96 nixos/keter: 2.0 -> 2.1
keter 2.1 now can log to stderr instead of file rotation.
Which is faster and more reliable.
These changes support that.

Announcement:
https://discourse.haskell.org/t/keter-2-1-0-released/6134

fix test by disabling log rotation

run nixpkgs fmt

move comment right before L37

run nixpkgs format on test

Add overridable default configuration

depracate keterRoot and use root, same for package

split doc lines

use lib.getExe to get keter binary

put mkRenamedOptionModule on one line
2023-06-14 11:54:03 -04:00

43 lines
1,018 B
Nix

import ./make-test-python.nix ({ pkgs, ... }:
let
port = 81;
in
{
name = "keter";
meta = with pkgs.lib.maintainers; {
maintainers = [ jappie ];
};
nodes.machine = { config, pkgs, ... }: {
services.keter = {
enable = true;
globalKeterConfig = {
cli-port = 123; # just adding this to test the freeform
listeners = [{
host = "*4";
inherit port;
}];
};
bundle = {
appName = "test-bundle";
domain = "localhost";
executable = pkgs.writeShellScript "run" ''
${pkgs.python3}/bin/python -m http.server $PORT
'';
};
};
};
testScript =
''
machine.wait_for_unit("keter.service")
machine.wait_for_open_port(${toString port})
machine.wait_for_console_text("Activating app test-bundle with hosts: localhost")
machine.succeed("curl --fail http://localhost:${toString port}/")
'';
})