Merge pull request #238250 from Ma27/nextcloud-declarative-test-fix
nixos/tests/nextcloud: fix more issues related to redis tests
This commit is contained in:
commit
30c0a2f738
|
@ -1,4 +1,5 @@
|
||||||
import ../make-test-python.nix ({ pkgs, ...}: let
|
args@{ nextcloudVersion ? 27, ... }:
|
||||||
|
(import ../make-test-python.nix ({ pkgs, ...}: let
|
||||||
username = "custom_admin_username";
|
username = "custom_admin_username";
|
||||||
# This will be used both for redis and postgresql
|
# This will be used both for redis and postgresql
|
||||||
pass = "hunter2";
|
pass = "hunter2";
|
||||||
|
@ -9,7 +10,7 @@ import ../make-test-python.nix ({ pkgs, ...}: let
|
||||||
in {
|
in {
|
||||||
name = "nextcloud-with-declarative-redis";
|
name = "nextcloud-with-declarative-redis";
|
||||||
meta = with pkgs.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ eqyiel ];
|
maintainers = [ eqyiel ma27 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
|
@ -22,6 +23,7 @@ in {
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hostName = "nextcloud";
|
hostName = "nextcloud";
|
||||||
|
package = pkgs.${"nextcloud" + (toString nextcloudVersion)};
|
||||||
caching = {
|
caching = {
|
||||||
apcu = false;
|
apcu = false;
|
||||||
redis = true;
|
redis = true;
|
||||||
|
@ -47,8 +49,11 @@ in {
|
||||||
configureRedis = true;
|
configureRedis = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.redis.servers."nextcloud".enable = true;
|
services.redis.servers."nextcloud" = {
|
||||||
services.redis.servers."nextcloud".port = 6379;
|
enable = true;
|
||||||
|
port = 6379;
|
||||||
|
requirePass = "secret";
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services.nextcloud-setup= {
|
systemd.services.nextcloud-setup= {
|
||||||
requires = ["postgresql.service"];
|
requires = ["postgresql.service"];
|
||||||
|
@ -114,4 +119,4 @@ in {
|
||||||
# redis cache should not be empty
|
# redis cache should not be empty
|
||||||
nextcloud.fail('test "[]" = "$(redis-cli --json KEYS "*")"')
|
nextcloud.fail('test "[]" = "$(redis-cli --json KEYS "*")"')
|
||||||
'';
|
'';
|
||||||
})
|
})) args
|
||||||
|
|
|
@ -89,5 +89,8 @@ in {
|
||||||
"${withRcloneEnv} ${diffSharedFile}"
|
"${withRcloneEnv} ${diffSharedFile}"
|
||||||
)
|
)
|
||||||
nextcloud.wait_until_succeeds("journalctl -u nextcloud-notify_push | grep -q \"Sending ping to ${adminuser}\"")
|
nextcloud.wait_until_succeeds("journalctl -u nextcloud-notify_push | grep -q \"Sending ping to ${adminuser}\"")
|
||||||
|
|
||||||
|
# redis cache should not be empty
|
||||||
|
nextcloud.fail('test "[]" = "$(redis-cli --json KEYS "*")"')
|
||||||
'';
|
'';
|
||||||
})) args
|
})) args
|
||||||
|
|
Loading…
Reference in a new issue