2024-06-11 12:37:01 +02:00
|
|
|
{ pkgs, testBase, system, ... }:
|
2021-10-01 17:03:32 +02:00
|
|
|
|
2024-06-11 12:37:01 +02:00
|
|
|
with import ../../lib/testing-python.nix { inherit system pkgs; };
|
|
|
|
runTest ({ config, ... }: {
|
2018-06-29 19:17:54 +02:00
|
|
|
name = "nextcloud-with-mysql-and-memcached";
|
2021-01-10 20:08:30 +01:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2018-06-29 19:17:54 +02:00
|
|
|
maintainers = [ eqyiel ];
|
|
|
|
};
|
|
|
|
|
2024-06-11 12:37:01 +02:00
|
|
|
imports = [ testBase ];
|
2018-06-29 19:17:54 +02:00
|
|
|
|
2024-06-11 12:37:01 +02:00
|
|
|
nodes = {
|
2018-06-29 19:17:54 +02:00
|
|
|
nextcloud = { config, pkgs, ... }: {
|
|
|
|
services.nextcloud = {
|
|
|
|
caching = {
|
|
|
|
apcu = true;
|
|
|
|
redis = false;
|
|
|
|
memcached = true;
|
|
|
|
};
|
2024-06-11 12:37:01 +02:00
|
|
|
config.dbtype = "mysql";
|
2018-06-29 19:17:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
services.memcached.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-06-11 12:37:01 +02:00
|
|
|
test-helpers.init = let
|
2018-06-29 19:17:54 +02:00
|
|
|
configureMemcached = pkgs.writeScript "configure-memcached" ''
|
|
|
|
nextcloud-occ config:system:set memcached_servers 0 0 --value 127.0.0.1 --type string
|
|
|
|
nextcloud-occ config:system:set memcached_servers 0 1 --value 11211 --type integer
|
|
|
|
nextcloud-occ config:system:set memcache.local --value '\OC\Memcache\APCu' --type string
|
|
|
|
nextcloud-occ config:system:set memcache.distributed --value '\OC\Memcache\Memcached' --type string
|
|
|
|
'';
|
|
|
|
in ''
|
2019-11-27 10:50:26 +01:00
|
|
|
nextcloud.succeed("${configureMemcached}")
|
2018-06-29 19:17:54 +02:00
|
|
|
'';
|
2024-06-11 12:37:01 +02:00
|
|
|
})
|