1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-22 06:05:13 +00:00
nixpkgs/nixos/tests/redis.nix

25 lines
559 B
Nix
Raw Normal View History

2019-11-06 14:57:56 +00:00
import ./make-test-python.nix ({ pkgs, ...} : {
2019-08-31 19:17:33 +01:00
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 = ''
2019-11-06 14:57:56 +00:00
start_all()
machine.wait_for_unit("redis")
machine.wait_for_open_port("6379")
machine.succeed("redis-cli ping | grep PONG")
machine.succeed("redis-cli -s /run/redis/redis.sock ping | grep PONG")
2019-08-31 19:17:33 +01:00
'';
})