about summary refs log tree commit diff
path: root/nixos/tests/loki.nix
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2020-11-10 10:36:53 +0100
committerJörg Thalheim <joerg@thalheim.io>2020-11-10 10:49:27 +0100
commit31a0b5dff6d9baa8c7aee4f77c379ed8fd3d1e19 (patch)
tree66c81aaf65984475444d8a5b3de30d89bf8d74d6 /nixos/tests/loki.nix
parent4c64fa224eca82883088852914fa8fd28789dc32 (diff)
nixos/promtail: fix access to journal
Diffstat (limited to 'nixos/tests/loki.nix')
-rw-r--r--nixos/tests/loki.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/tests/loki.nix b/nixos/tests/loki.nix
index eaee717cf87d8..bede775b7d3c3 100644
--- a/nixos/tests/loki.nix
+++ b/nixos/tests/loki.nix
@@ -45,6 +45,8 @@ import ./make-test-python.nix ({ lib, pkgs, ... }:
     machine.wait_for_open_port(3100)
     machine.wait_for_open_port(9080)
     machine.succeed("echo 'Loki Ingestion Test' > /var/log/testlog")
+    # should not have access to journal unless specified
+    machine.fail("systemctl show --property=SupplementaryGroups promtail | grep -q systemd-journal")
     machine.wait_until_succeeds(
         "${pkgs.grafana-loki}/bin/logcli --addr='http://localhost:3100' query --no-labels '{job=\"varlogs\",filename=\"/var/log/testlog\"}' | grep -q 'Loki Ingestion Test'"
     )