base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / nixos / tests / mollysocket.nix
blob5135d79fcba9b987eb96e5d51df9d1789c3902d4
1 import ./make-test-python.nix ({ pkgs, lib, ... }:
3 let
4   port = 1234;
5 in {
6   name = "mollysocket";
7   meta.maintainers = with lib.maintainers; [ dotlambda ];
9   nodes.mollysocket = { ... }: {
10     services.mollysocket = {
11       enable = true;
12       settings = {
13         inherit port;
14       };
15     };
16   };
18   testScript = ''
19     mollysocket.wait_for_unit("mollysocket.service")
20     mollysocket.wait_for_open_port(${toString port})
22     out = mollysocket.succeed("curl --fail http://127.0.0.1:${toString port}")
23     assert "Version ${pkgs.mollysocket.version}" in out
24   '';