diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2021-06-25 10:40:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-25 10:40:11 +0200 |
commit | eb5013d20d61645f93e7a31f120310e8f7b6d7d8 (patch) | |
tree | f2df3753c11d2ddb5ea0da8f19b06a3551b50536 /nixos/tests | |
parent | ff72815e512345a0d6afc140f2561bec84c6097a (diff) | |
parent | 44a982a00657ffd7997fd69100c49186d429ce6c (diff) | |
download | nixlib-eb5013d20d61645f93e7a31f120310e8f7b6d7d8.tar nixlib-eb5013d20d61645f93e7a31f120310e8f7b6d7d8.tar.gz nixlib-eb5013d20d61645f93e7a31f120310e8f7b6d7d8.tar.bz2 nixlib-eb5013d20d61645f93e7a31f120310e8f7b6d7d8.tar.lz nixlib-eb5013d20d61645f93e7a31f120310e8f7b6d7d8.tar.xz nixlib-eb5013d20d61645f93e7a31f120310e8f7b6d7d8.tar.zst nixlib-eb5013d20d61645f93e7a31f120310e8f7b6d7d8.zip |
Merge pull request #128048 from dali99/add-txredisapi-synapse
Add txredisapi to matrix-synapse dependencies
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/txredisapi.nix | 27 |
2 files changed, 28 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index e8c86394831d..a8e06a0cee1e 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -431,6 +431,7 @@ in trezord = handleTest ./trezord.nix {}; trickster = handleTest ./trickster.nix {}; trilium-server = handleTestOn ["x86_64-linux"] ./trilium-server.nix {}; + txredisapi = handleTest ./txredisapi.nix {}; tuptime = handleTest ./tuptime.nix {}; turbovnc-headless-server = handleTest ./turbovnc-headless-server.nix {}; ucarp = handleTest ./ucarp.nix {}; diff --git a/nixos/tests/txredisapi.nix b/nixos/tests/txredisapi.nix new file mode 100644 index 000000000000..bc3814a71375 --- /dev/null +++ b/nixos/tests/txredisapi.nix @@ -0,0 +1,27 @@ +import ./make-test-python.nix ({ pkgs, ... }: +{ + name = "txredisapi"; + meta = with pkgs.lib.maintainers; { + maintainers = [ dandellion ]; + }; + + nodes = { + machine = + { pkgs, ... }: + + { + services.redis.enable = true; + services.redis.unixSocket = "/run/redis/redis.sock"; + + environment.systemPackages = with pkgs; [ (python38.withPackages (ps: [ ps.twisted ps.txredisapi ps.mock ]))]; + }; + }; + + testScript = '' + start_all() + machine.wait_for_unit("redis") + machine.wait_for_open_port("6379") + + tests = machine.succeed("PYTHONPATH=\"${pkgs.python3Packages.txredisapi.src}\" python -m twisted.trial ${pkgs.python3Packages.txredisapi.src}/tests") + ''; +}) |