mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 12:15:34 +03:00
nixosTests.nextcloud.with-postgresql-and-redis*: also test notify_push
This commit is contained in:
parent
1f0aa74c8f
commit
8a5596aded
1 changed files with 12 additions and 1 deletions
|
@ -13,7 +13,7 @@ in {
|
||||||
# The only thing the client needs to do is download a file.
|
# The only thing the client needs to do is download a file.
|
||||||
client = { ... }: {};
|
client = { ... }: {};
|
||||||
|
|
||||||
nextcloud = { config, pkgs, ... }: {
|
nextcloud = { config, pkgs, lib, ... }: {
|
||||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||||
|
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
|
@ -34,6 +34,15 @@ in {
|
||||||
adminpassFile = toString (pkgs.writeText "admin-pass-file" ''
|
adminpassFile = toString (pkgs.writeText "admin-pass-file" ''
|
||||||
${adminpass}
|
${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}"
|
"${withRcloneEnv} ${copySharedFile}"
|
||||||
)
|
)
|
||||||
client.wait_for_unit("multi-user.target")
|
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(
|
client.succeed(
|
||||||
"${withRcloneEnv} ${diffSharedFile}"
|
"${withRcloneEnv} ${diffSharedFile}"
|
||||||
)
|
)
|
||||||
|
nextcloud.wait_until_succeeds("journalctl -u nextcloud-notify_push | grep -q \"Sending ping to ${adminuser}\"")
|
||||||
'';
|
'';
|
||||||
})) args
|
})) args
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue