mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 05:04:00 +00:00
3f2f5bea96
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
44 lines
1018 B
Nix
44 lines
1018 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}/")
|
|
'';
|
|
})
|