diff options
author | 0x4A6F <0x4A6F@users.noreply.github.com> | 2022-12-20 22:33:10 +0100 |
---|---|---|
committer | 0x4A6F <0x4A6F@users.noreply.github.com> | 2022-12-20 22:54:01 +0100 |
commit | 2b152c57276bee650bd2269d0f9de7588dc3bac1 (patch) | |
tree | b7f56eabe57d787bb226d7587c6b5b2164c52c98 | |
parent | 064b4d4ac19aef9c67a85ff897e197fa29810574 (diff) |
test/coturn: add some sanity-checks
-rw-r--r-- | nixos/tests/coturn.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/tests/coturn.nix b/nixos/tests/coturn.nix index dff832281c7c..301b34b0da70 100644 --- a/nixos/tests/coturn.nix +++ b/nixos/tests/coturn.nix @@ -1,4 +1,4 @@ -import ./make-test-python.nix ({ ... }: { +import ./make-test-python.nix ({ pkgs, ... }: { name = "coturn"; nodes = { default = { @@ -25,5 +25,9 @@ import ./make-test-python.nix ({ ... }: { with subtest("works with static-auth-secret-file"): secretsfile.wait_for_unit("coturn.service") secretsfile.succeed("grep 'some-very-secret-string' /run/coturn/turnserver.cfg") + # Forbidden IP, fails: + secretsfile.fail("${pkgs.coturn}/bin/turnutils_uclient -W some-very-secret-string 127.0.0.1 -DgX -e 127.0.0.1 -n 1 -c -y") + # allowed-peer-ip, should succeed: + secretsfile.succeed("${pkgs.coturn}/bin/turnutils_uclient -W some-very-secret-string 192.168.1.2 -DgX -e 192.168.1.2 -n 1 -c -y") ''; }) |