about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorajs124 <git@ajs124.de>2022-12-15 22:22:00 +0100
committerajs124 <git@ajs124.de>2023-02-21 15:05:16 +0100
commit8a5596adedaf930c696577c4326762abc84e5fa8 (patch)
tree6de06044b6b8d684f8ed760def87534ba95cdf46 /nixos/tests
parent1f0aa74c8f83fe589688844e932688dd540c18a6 (diff)
nixosTests.nextcloud.with-postgresql-and-redis*: also test notify_push
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/nextcloud/with-postgresql-and-redis.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/nixos/tests/nextcloud/with-postgresql-and-redis.nix b/nixos/tests/nextcloud/with-postgresql-and-redis.nix
index 1ef848cfb1217..d28c1bdfd6e1e 100644
--- a/nixos/tests/nextcloud/with-postgresql-and-redis.nix
+++ b/nixos/tests/nextcloud/with-postgresql-and-redis.nix
@@ -13,7 +13,7 @@ in {
     # The only thing the client needs to do is download a file.
     client = { ... }: {};
 
-    nextcloud = { config, pkgs, ... }: {
+    nextcloud = { config, pkgs, lib, ... }: {
       networking.firewall.allowedTCPPorts = [ 80 ];
 
       services.nextcloud = {
@@ -34,6 +34,15 @@ in {
           adminpassFile = toString (pkgs.writeText "admin-pass-file" ''
             ${adminpass}
           '');
+          trustedProxies = [ "::1" ];
+        };
+        notify_push = {
+          enable = true;
+          logLevel = "debug";
+        };
+        extraAppsEnable = true;
+        extraApps = {
+          inherit (pkgs."nextcloud${lib.versions.major config.services.nextcloud.package.version}Packages".apps) notify_push;
         };
       };
 
@@ -94,8 +103,10 @@ in {
         "${withRcloneEnv} ${copySharedFile}"
     )
     client.wait_for_unit("multi-user.target")
+    client.execute("${pkgs.nextcloud-notify_push.passthru.test_client}/bin/test_client http://nextcloud ${adminuser} ${adminpass} >&2 &")
     client.succeed(
         "${withRcloneEnv} ${diffSharedFile}"
     )
+    nextcloud.wait_until_succeeds("journalctl -u nextcloud-notify_push | grep -q \"Sending ping to ${adminuser}\"")
   '';
 })) args