1 import ./make-test-python.nix ({ pkgs, ... }: {
3 meta = with pkgs.lib; {
4 maintainers = teams.jitsi.members;
8 client = { nodes, pkgs, ... }: {
10 server = { config, pkgs, ... }: {
11 services.jitsi-meet = {
15 services.jitsi-videobridge.openFirewall = true;
17 networking.firewall.allowedTCPPorts = [ 80 443 ];
19 services.nginx.virtualHosts.server = {
24 security.acme.acceptTerms = true;
25 security.acme.defaults.email = "me@example.org";
26 security.acme.defaults.server = "https://example.com"; # self-signed only
28 specialisation.caddy = {
29 inheritParentConfig = true;
31 services.jitsi-meet = {
35 services.caddy.virtualHosts.${config.services.jitsi-meet.hostName}.extraConfig = ''
43 testScript = { nodes, ... }: ''
44 server.wait_for_unit("jitsi-videobridge2.service")
45 server.wait_for_unit("jicofo.service")
46 server.wait_for_unit("nginx.service")
47 server.wait_for_unit("prosody.service")
49 server.wait_until_succeeds(
50 "journalctl -b -u prosody -o cat | grep -q 'Authenticated as focus@auth.server'"
52 server.wait_until_succeeds(
53 "journalctl -b -u prosody -o cat | grep -q 'Authenticated as jvb@auth.server'"
56 client.wait_for_unit("network.target")
59 assert "<title>Jitsi Meet</title>" in client.succeed("curl -sSfkL http://server/")
63 with subtest("Testing backup service"):
64 server.succeed("${nodes.server.system.build.toplevel}/specialisation/caddy/bin/switch-to-configuration test")
65 server.wait_for_unit("caddy.service")