1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00
nixpkgs/nixos/tests/freeswitch.nix
Dominik Xaver Hörl 25bef2d8f9 treewide: simplify pkgs.stdenv.lib -> pkgs.lib
The library does not depend on stdenv, that `stdenv` exposes `lib` is
an artifact of the ancient origins of nixpkgs.
2021-01-10 20:12:06 +01:00

30 lines
746 B
Nix

import ./make-test-python.nix ({ pkgs, ...} : {
name = "freeswitch";
meta = with pkgs.lib.maintainers; {
maintainers = [ misuzu ];
};
nodes = {
node0 = { config, lib, ... }: {
networking.useDHCP = false;
networking.interfaces.eth1 = {
ipv4.addresses = [
{
address = "192.168.0.1";
prefixLength = 24;
}
];
};
services.freeswitch = {
enable = true;
enableReload = true;
configTemplate = "${config.services.freeswitch.package}/share/freeswitch/conf/minimal";
};
};
};
testScript = ''
node0.wait_for_unit("freeswitch.service")
# Wait for SIP port to be open
node0.wait_for_open_port("5060")
'';
})