forked from mirrors/nixpkgs
nixos/redis: add test
This commit is contained in:
parent
8680f72c88
commit
c00c4b1940
|
@ -234,6 +234,7 @@ in
|
|||
rabbitmq = handleTest ./rabbitmq.nix {};
|
||||
radarr = handleTest ./radarr.nix {};
|
||||
radicale = handleTest ./radicale.nix {};
|
||||
redis = handleTest ./redis.nix {};
|
||||
redmine = handleTest ./redmine.nix {};
|
||||
roundcube = handleTest ./roundcube.nix {};
|
||||
rspamd = handleTest ./rspamd.nix {};
|
||||
|
|
26
nixos/tests/redis.nix
Normal file
26
nixos/tests/redis.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "redis";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ flokli ];
|
||||
};
|
||||
|
||||
nodes = {
|
||||
machine =
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.redis.enable = true;
|
||||
services.redis.unixSocket = "/run/redis/redis.sock";
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
|
||||
$machine->waitForUnit("redis");
|
||||
$machine->waitForOpenPort("6379");
|
||||
|
||||
$machine->succeed("redis-cli ping | grep PONG");
|
||||
$machine->succeed("redis-cli -s /run/redis/redis.sock ping | grep PONG");
|
||||
'';
|
||||
})
|
Loading…
Reference in a new issue