3
0
Fork 0
forked from mirrors/nixpkgs

nixos/redis: add test

This commit is contained in:
Florian Klink 2019-08-31 20:17:33 +02:00
parent 8680f72c88
commit c00c4b1940
2 changed files with 27 additions and 0 deletions

View file

@ -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
View 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");
'';
})