about summary refs log tree commit diff
path: root/nixos/tests/go-neb.nix
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2021-06-22 09:07:50 +0200
committerJörg Thalheim <joerg@thalheim.io>2021-06-26 11:59:50 +0200
commit34d1c55580cbf76bee01beef023b0d12d3f385cf (patch)
treed144a08c39856f4f0707fc156f303538d3bf7db4 /nixos/tests/go-neb.nix
parent00ead2addd89654e843a5eb977ecb089044a2245 (diff)
nixos/go-neb: secret support
Diffstat (limited to 'nixos/tests/go-neb.nix')
-rw-r--r--nixos/tests/go-neb.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/nixos/tests/go-neb.nix b/nixos/tests/go-neb.nix
index f8801ff68d64d..4bd03dcf3c6b4 100644
--- a/nixos/tests/go-neb.nix
+++ b/nixos/tests/go-neb.nix
@@ -10,10 +10,11 @@ import ./make-test-python.nix ({ pkgs, ... }:
       services.go-neb = {
         enable = true;
         baseUrl = "http://localhost";
+        secretFile = pkgs.writeText "secrets" "ACCESS_TOKEN=changeme";
         config = {
           clients = [ {
             UserId = "@test:localhost";
-            AccessToken = "changeme";
+            AccessToken = "$ACCESS_TOKEN";
             HomeServerUrl = "http://localhost";
             Sync = false;
             AutoJoinRooms = false;
@@ -33,11 +34,10 @@ import ./make-test-python.nix ({ pkgs, ... }:
   testScript = ''
     start_all()
     server.wait_for_unit("go-neb.service")
-    server.wait_until_succeeds(
-        "curl -fL http://localhost:4050/services/hooks/d2lraXBlZGlhX3NlcnZpY2U"
-    )
-    server.wait_until_succeeds(
-        "journalctl -eu go-neb -o cat | grep -q service_id=wikipedia_service"
+    server.wait_until_succeeds("curl -fL http://localhost:4050/services/hooks/d2lraXBlZGlhX3NlcnZpY2U")
+    server.succeed(
+        "journalctl -eu go-neb -o cat | grep -q service_id=wikipedia_service",
+        "grep -q changeme /var/run/go-neb/config.yaml",
     )
   '';