nixosTests.nextcloud.with-postgresql-and-redis*: also test notify_push

This commit is contained in:
ajs124 2022-12-15 22:22:00 +01:00
parent 1f0aa74c8f
commit 8a5596aded

View file

@ -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