2023-08-23 20:17:20 +03:00
|
|
|
{ pkgs, config, ... }: {
|
2023-08-02 07:28:19 +03:00
|
|
|
services.redis-cluster."c1".enable = true;
|
2023-08-23 20:17:20 +03:00
|
|
|
|
|
|
|
settings.processes.test =
|
|
|
|
let
|
|
|
|
cfg = config.services.redis-cluster."c1";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
command = pkgs.writeShellApplication {
|
|
|
|
runtimeInputs = [ cfg.package pkgs.gnugrep ];
|
|
|
|
text = ''
|
|
|
|
redis-cli -p 30001 ping | grep -q "PONG"
|
|
|
|
redis-cli -p 30002 ping | grep -q "PONG"
|
|
|
|
redis-cli -p 30003 ping | grep -q "PONG"
|
|
|
|
redis-cli -p 30004 ping | grep -q "PONG"
|
|
|
|
redis-cli -p 30005 ping | grep -q "PONG"
|
|
|
|
redis-cli -p 30006 ping | grep -q "PONG"
|
|
|
|
'';
|
|
|
|
name = "redis-cluster-test";
|
|
|
|
};
|
|
|
|
depends_on."c1-cluster-create".condition = "process_completed";
|
|
|
|
};
|
|
|
|
|
2023-08-02 07:28:19 +03:00
|
|
|
}
|