1 import ./make-test-python.nix (
8 virtualisation.vlans = [ 1 ];
13 firewall.enable = false;
16 systemd.network.networks."01-eth1" = {
18 networkConfig.Address = "10.0.0.1/24";
23 secretFile = pkgs.writeText "secret" ''
32 bind = "127.0.0.1:3478";
33 external = "127.0.0.1:3478";
37 bind = "127.0.0.1:3478";
38 external = "127.0.0.1:3478";
43 auth.static_credentials.user1 = "$USER_1_CREDS";
54 server.wait_for_unit('turn-rs.service')
55 server.wait_for_open_port(3000, "127.0.0.1")
57 info = server.succeed('curl http://localhost:3000/info')
58 jsonInfo = json.loads(info)
59 assert len(jsonInfo['interfaces']) == 2, f'Interfaces doesn\'t contain two entries:\n{json.dumps(jsonInfo, indent=2)}'
61 config = server.succeed('cat /run/turn-rs/config.toml')
62 assert 'foobar' in config, f'Secrets are not properly injected:\n{config}'