about summary refs log tree commit diff
path: root/nixos/tests/graylog.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/graylog.nix')
-rw-r--r--nixos/tests/graylog.nix17
1 files changed, 15 insertions, 2 deletions
diff --git a/nixos/tests/graylog.nix b/nixos/tests/graylog.nix
index 3f7cc3a914390..b52c2976a73f8 100644
--- a/nixos/tests/graylog.nix
+++ b/nixos/tests/graylog.nix
@@ -1,10 +1,10 @@
 import ./make-test-python.nix ({ pkgs, lib, ... }: {
   name = "graylog";
-  meta.maintainers = with lib.maintainers; [ ];
+  meta.maintainers = [ ];
 
   nodes.machine = { pkgs, ... }: {
     virtualisation.memorySize = 4096;
-    virtualisation.diskSize = 4096;
+    virtualisation.diskSize = 1024 * 6;
 
     services.mongodb.enable = true;
     services.elasticsearch.enable = true;
@@ -65,9 +65,18 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
   in ''
     machine.start()
     machine.wait_for_unit("graylog.service")
+
+    machine.wait_until_succeeds(
+      "journalctl -o cat -u graylog.service | grep 'Started REST API at <127.0.0.1:9000>'"
+    )
+
     machine.wait_for_open_port(9000)
     machine.succeed("curl -sSfL http://127.0.0.1:9000/")
 
+    machine.wait_until_succeeds(
+      "journalctl -o cat -u graylog.service | grep 'Graylog server up and running'"
+    )
+
     session = machine.succeed(
         "curl -X POST "
         + "-sSfL http://127.0.0.1:9000/api/system/sessions "
@@ -88,6 +97,10 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
     )
 
     machine.wait_until_succeeds(
+      "journalctl -o cat -u graylog.service | grep -E 'Input \[GELF UDP/Demo/[[:alnum:]]{24}\] is now RUNNING'"
+    )
+
+    machine.wait_until_succeeds(
         "test \"$(curl -sSfL 'http://127.0.0.1:9000/api/cluster/inputstates' "
         + f"-u {session}:session "
         + "-H 'Accept: application/json' "