mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-11 15:08:33 +01:00
nixos/tests/coturn: init
Co-authored-by: MatthewCroughan <matt@croughan.sh>
This commit is contained in:
parent
3aa9692beb
commit
971e37dc07
|
@ -88,6 +88,7 @@ in
|
|||
containers-tmpfs = handleTest ./containers-tmpfs.nix {};
|
||||
convos = handleTest ./convos.nix {};
|
||||
corerad = handleTest ./corerad.nix {};
|
||||
coturn = handleTest ./coturn.nix {};
|
||||
couchdb = handleTest ./couchdb.nix {};
|
||||
cri-o = handleTestOn ["x86_64-linux"] ./cri-o.nix {};
|
||||
custom-ca = handleTest ./custom-ca.nix {};
|
||||
|
|
29
nixos/tests/coturn.nix
Normal file
29
nixos/tests/coturn.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
import ./make-test-python.nix ({ ... }: {
|
||||
name = "coturn";
|
||||
nodes = {
|
||||
default = {
|
||||
services.coturn.enable = true;
|
||||
};
|
||||
secretsfile = {
|
||||
boot.postBootCommands = ''
|
||||
echo "some-very-secret-string" > /run/coturn-secret
|
||||
'';
|
||||
services.coturn = {
|
||||
enable = true;
|
||||
static-auth-secret-file = "/run/coturn-secret";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
start_all()
|
||||
|
||||
with subtest("by default works without configuration"):
|
||||
default.wait_for_unit("coturn.service")
|
||||
|
||||
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")
|
||||
'';
|
||||
})
|
Loading…
Reference in a new issue