TT#22018 Add system-test to check asterisk ODBC connection on PRO/Carrier

Check node with role PROXY only, as another nodes has no asterisk running.

Change-Id: I484cc10afda4ec47227177ddd37866fa64a61fa3
changes/71/16271/4
Alexander Lutay 8 years ago
parent 9d8a440e2b
commit 2b2e1def10

@ -0,0 +1,34 @@
[%
PROCESS '/usr/lib/ngcp-ngcpcfg/get_hostname';
hostname = out;
argv.host = hostname;
argv.role = 'proxy';
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
is_proxy = out;
-%]
[% PERL -%]
my $node_state = qx(ngcp-check_active -v);
chomp $node_state;
$stash->set(node_state => $node_state);
[% END -%]
command:
[% IF is_proxy && asterisk.enabled == "yes" && node_state == 'active' -%]
asterisk -rx "voicemail show users for default":
exit-status: 0
stdout:
- "/Configured Voicemail Users/"
stderr: []
timeout: 10000
[% ELSE -%]
echo "The test for active node with enabled asterisk and proxy role only":
exit-status: 0
stdout: []
stderr: []
timeout: 10000
[% END -%]

@ -36,3 +36,6 @@ gossfile:
[% END -%]
900_service-ngcp-api.yaml: {}
910_service-influxdb.yaml: {}
[% IF general.ngcp_type != 'spce' -%]
920_service-asterisk-odbc-pro.yaml: {}
[% END -%]

Loading…
Cancel
Save