2 system ? builtins.currentSystem,
4 pkgs ? import ../../.. { inherit system config; },
9 makeTest = import ./make-test-python.nix;
11 pkg: "${pkg.pname}_${builtins.replaceStrings [ "." ] [ "" ] (lib.versions.majorMinor pkg.version)}";
13 inherit (pkgs) redis keydb;
18 name ? mkTestName package,
23 lib.maintainers.flokli
24 lib.teams.helsinki-systems.members
35 servers."".enable = true;
36 servers."test".enable = true;
40 users.users = lib.listToAttrs (
44 lib.nameValuePair "member${suffix}" {
46 description = "A member of the redis${suffix} group";
48 extraGroups = [ "redis${suffix}" ];
62 inherit (nodes.machine.services) redis;
66 machine.wait_for_unit("redis")
67 machine.wait_for_unit("redis-test")
69 # The unnamed Redis server still opens a port for backward-compatibility
70 machine.wait_for_open_port(6379)
72 machine.wait_for_file("${redis.servers."".unixSocket}")
73 machine.wait_for_file("${redis.servers."test".unixSocket}")
75 # The unix socket is accessible to the redis group
76 machine.succeed('su member -c "${pkgs.redis}/bin/redis-cli ping | grep PONG"')
77 machine.succeed('su member-test -c "${pkgs.redis}/bin/redis-cli ping | grep PONG"')
79 machine.succeed("${pkgs.redis}/bin/redis-cli ping | grep PONG")
80 machine.succeed("${pkgs.redis}/bin/redis-cli -s ${redis.servers."".unixSocket} ping | grep PONG")
81 machine.succeed("${pkgs.redis}/bin/redis-cli -s ${
82 redis.servers."test".unixSocket
87 lib.mapAttrs (_: package: makeRedisTest { inherit package; }) redisPackages