diff options
author | misuzu <bakalolka@gmail.com> | 2020-01-07 16:53:34 +0200 |
---|---|---|
committer | misuzu <bakalolka@gmail.com> | 2020-01-30 17:16:49 +0200 |
commit | 0a43e431ca85b4f8e6bdcb4c164e68e986930c2f (patch) | |
tree | 49a00ca9c5b5d3d60181c002410bc9c5fd8e413f /nixos/tests/freeswitch.nix | |
parent | ed41104a3b39be392a22f7cfb9808b4d9deb7710 (diff) |
nixos/freeswitch: init
Diffstat (limited to 'nixos/tests/freeswitch.nix')
-rw-r--r-- | nixos/tests/freeswitch.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/nixos/tests/freeswitch.nix b/nixos/tests/freeswitch.nix new file mode 100644 index 0000000000000..349d0e7bc6f0d --- /dev/null +++ b/nixos/tests/freeswitch.nix @@ -0,0 +1,29 @@ +import ./make-test-python.nix ({ pkgs, ...} : { + name = "freeswitch"; + meta = with pkgs.stdenv.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") + ''; +}) |