Merge pull request #305845 from abathur/resholve_0.10.5
[NixPkgs.git] / nixos / tests / freeswitch.nix
blobbfb7339ec3c0df4ef5883483f25e58798cec61d4
1 import ./make-test-python.nix ({ pkgs, ...} : {
2   name = "freeswitch";
3   meta = with pkgs.lib.maintainers; {
4     maintainers = [ misuzu ];
5   };
6   nodes = {
7     node0 = { config, lib, ... }: {
8       networking.useDHCP = false;
9       networking.interfaces.eth1 = {
10         ipv4.addresses = [
11           {
12             address = "192.168.0.1";
13             prefixLength = 24;
14           }
15         ];
16       };
17       services.freeswitch = {
18         enable = true;
19         enableReload = true;
20         configTemplate = "${config.services.freeswitch.package}/share/freeswitch/conf/minimal";
21       };
22     };
23   };
24   testScript = ''
25     node0.wait_for_unit("freeswitch.service")
26     # Wait for SIP port to be open
27     node0.wait_for_open_port(5060)
28   '';