about summary refs log tree commit diff
path: root/nixos/tests/keter.nix
diff options
context:
space:
mode:
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 0bfb96e1c324..1cc2ffbde0a0 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}/")
+      '';
+  })