2024-06-20 14:57:18 +00:00
|
|
|
{ pkgs, testBase, system, ... }:
|
2021-10-04 12:37:57 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
with import ../../lib/testing-python.nix { inherit system pkgs; };
|
|
|
|
runTest ({ config, ... }: {
|
2020-04-24 23:36:52 +00:00
|
|
|
name = "nextcloud-with-mysql-and-memcached";
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ eqyiel ];
|
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
imports = [ testBase ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
nodes = {
|
2020-04-24 23:36:52 +00:00
|
|
|
nextcloud = { config, pkgs, ... }: {
|
|
|
|
services.nextcloud = {
|
|
|
|
caching = {
|
|
|
|
apcu = true;
|
|
|
|
redis = false;
|
|
|
|
memcached = true;
|
|
|
|
};
|
2024-06-20 14:57:18 +00:00
|
|
|
config.dbtype = "mysql";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
services.memcached.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
test-helpers.init = let
|
2020-04-24 23:36:52 +00: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 ''
|
|
|
|
nextcloud.succeed("${configureMemcached}")
|
|
|
|
'';
|
2024-06-20 14:57:18 +00:00
|
|
|
})
|