about summary refs log tree commit diff
path: root/nixos/tests/keter.nix
diff options
context:
space:
mode:
authorJappie Klooster <jappieklooster@hotmail.com>2023-04-11 15:38:34 +0200
committerJappie Klooster <jappieklooster@hotmail.com>2023-06-14 11:54:03 -0400
commit3f2f5bea96961fd0337f7fd3c523ad338155b078 (patch)
tree451ec2498a0cc41ca1f568c568a960a8066fdd4e /nixos/tests/keter.nix
parent2d623b46898116b5aa4ed70f6e6cf3f3f86aed51 (diff)
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
Diffstat (limited to 'nixos/tests/keter.nix')
-rw-r--r--nixos/tests/keter.nix65
1 files changed, 33 insertions, 32 deletions
diff --git a/nixos/tests/keter.nix b/nixos/tests/keter.nix
index 0bfb96e1c3245..1cc2ffbde0a08 100644
--- a/nixos/tests/keter.nix
+++ b/nixos/tests/keter.nix
@@ -1,42 +1,43 @@
 import ./make-test-python.nix ({ pkgs, ... }:
-let
-  port = 81;
-in
-{
-  name = "keter";
-  meta = with pkgs.lib.maintainers; {
-    maintainers = [ jappie ];
-  };
+  let
+    port = 81;
+  in
+  {
+    name = "keter";
+    meta = with pkgs.lib.maintainers; {
+      maintainers = [ jappie ];
+    };
 
 
-  nodes.machine = { config, pkgs, ... }: {
-    services.keter = {
-      enable = true;
+    nodes.machine = { config, pkgs, ... }: {
+      services.keter = {
+        enable = true;
 
-      globalKeterConfig = {
-        listeners = [{
-          host = "*4";
-          inherit port;
-        }];
-      };
-      bundle = {
-        appName = "test-bundle";
-        domain = "localhost";
-        executable = pkgs.writeShellScript "run" ''
-          ${pkgs.python3}/bin/python -m http.server $PORT
-        '';
+        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")
+    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.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}/")
-    '';
-})
+        machine.succeed("curl --fail http://localhost:${toString port}/")
+      '';
+  })