mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-10 08:39:08 +03:00
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";
|
||||
# This will be used both for redis and postgresql
|
||||
pass = "hunter2";
|
||||
@ -9,7 +10,7 @@ import ../make-test-python.nix ({ pkgs, ...}: let
|
||||
in {
|
||||
name = "nextcloud-with-declarative-redis";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ eqyiel ];
|
||||
maintainers = [ eqyiel ma27 ];
|
||||
};
|
||||
|
||||
nodes = {
|
||||
@ -22,6 +23,7 @@ in {
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
hostName = "nextcloud";
|
||||
package = pkgs.${"nextcloud" + (toString nextcloudVersion)};
|
||||
caching = {
|
||||
apcu = false;
|
||||
redis = true;
|
||||
@ -47,8 +49,11 @@ in {
|
||||
configureRedis = true;
|
||||
};
|
||||
|
||||
services.redis.servers."nextcloud".enable = true;
|
||||
services.redis.servers."nextcloud".port = 6379;
|
||||
services.redis.servers."nextcloud" = {
|
||||
enable = true;
|
||||
port = 6379;
|
||||
requirePass = "secret";
|
||||
};
|
||||
|
||||
systemd.services.nextcloud-setup= {
|
||||
requires = ["postgresql.service"];
|
||||
@ -114,4 +119,4 @@ in {
|
||||
# redis cache should not be empty
|
||||
nextcloud.fail('test "[]" = "$(redis-cli --json KEYS "*")"')
|
||||
'';
|
||||
})
|
||||
})) args
|
||||
|
@ -89,5 +89,8 @@ in {
|
||||
"${withRcloneEnv} ${diffSharedFile}"
|
||||
)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user