1import ./make-test-python.nix ({ lib, pkgs, ... }:
2
3with lib;
4let
5 port = 3333;
6in
7{
8 name = "convos";
9 meta = with pkgs.lib.maintainers; {
10 maintainers = [ sgo ];
11 };
12
13 nodes = {
14 machine =
15 { pkgs, ... }:
16 {
17 services.convos = {
18 enable = true;
19 listenPort = port;
20 };
21 };
22 };
23
24 testScript = ''
25 machine.wait_for_unit("convos")
26 machine.wait_for_open_port(${toString port})
27 machine.succeed("journalctl -u convos | grep -q 'application available at.*${toString port}'")
28 machine.succeed("curl -f http://localhost:${toString port}/")
29 '';
30})