Unverified Commit 9ffa0a59 authored by networkException's avatar networkException
Browse files

nixos/tests/nextcloud: test for notify_push in with-declarative-redis-and-secrets

This patch adds a subtest and corresponding configuration to
with-declarative-redis-and-secrets to test for nextcloud notify_push
to be working, just as in with-postgresql-and-redis.

As notify_push needs to connect to the database, including it
in this test checks that it can read the dbpassFile properly.
parent c80e750b
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -34,6 +34,13 @@ runTest (
              redis = true;
              memcached = false;
            };
            notify_push = {
              enable = true;
              bendDomainToLocalhost = true;
              logLevel = "debug";
            };
            extraAppsEnable = true;
            extraApps.notify_push = config.services.nextcloud.package.packages.apps.notify_push;
            # This test also validates that we can use an "external" database
            database.createLocally = false;
            config = {
@@ -96,6 +103,10 @@ runTest (
      with subtest("non-empty redis cache"):
          # redis cache should not be empty
          nextcloud.fail('test 0 -lt "$(redis-cli --pass secret --json KEYS "*" | jq "len")"')

      with subtest("notify-push"):
          client.execute("${pkgs.lib.getExe pkgs.nextcloud-notify_push.passthru.test_client} http://nextcloud ${config.adminuser} ${config.adminpass} >&2 &")
          nextcloud.wait_until_succeeds("journalctl -u nextcloud-notify_push | grep -q \"Sending ping to ${config.adminuser}\"")
    '';
  }
)