aboutsummaryrefslogtreecommitdiffstats
path: root/mgw/MGCP_Test.ttcn
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2019-02-20 16:13:41 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2019-02-20 17:00:33 +0100
commit6137c32e05b154971ad8c3f3199e712c1edff9ad (patch)
treef503d318c0a5787b489660bc24309487498d9671 /mgw/MGCP_Test.ttcn
parent07e8dde671b0cf22842d1fb1cec2ed78f3f7bf0f (diff)
MGCP_Test: Add VTY access
The MGCP_Test testsuite currenty lacks VTY access capabilities, lets add them so that future testcases can access the VTY in order to change options on the fly. Depends: osmo-ttcn3-hacks Ife949c61156222de3026280071226ef6f5dbd959 Change-Id: If383f81af3306f8f5bdf50152498ae1303d390df Related: OS#3807
Diffstat (limited to 'mgw/MGCP_Test.ttcn')
-rw-r--r--mgw/MGCP_Test.ttcn16
1 files changed, 16 insertions, 0 deletions
diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index 9adeb2a6..9eff8c23 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -9,6 +9,12 @@ module MGCP_Test {
import from RTP_CodecPort_CtrlFunct all;
import from RTP_Emulation all;
import from IPL4asp_Types all;
+ import from General_Types all;
+ import from Native_Functions all;
+ import from IPCP_Types all;
+ import from IP_Types all;
+ import from Osmocom_VTY_Functions all;
+ import from TELNETasp_PortType all;
const charstring c_mgw_domain := "mgw";
const charstring c_mgw_ep_rtpbridge := "rtpbridge/";
@@ -24,6 +30,8 @@ module MGCP_Test {
var RTP_Emulation_CT vc_RTPEM[3];
port RTPEM_CTRL_PT RTPEM[3];
+
+ port TELNETasp_PT MGWVTY;
};
function get_next_trans_id() runs on dummy_CT return MgcpTransId {
@@ -44,6 +52,12 @@ module MGCP_Test {
PortNumber mp_local_rtp_port_base := 10000;
}
+ private function f_init_vty() runs on dummy_CT {
+ map(self:MGWVTY, system:MGWVTY);
+ f_vty_set_prompts(MGWVTY);
+ f_vty_transceive(MGWVTY, "enable");
+ }
+
private function f_rtpem_init(inout RTP_Emulation_CT comp_ref, integer i)
runs on dummy_CT {
comp_ref := RTP_Emulation_CT.create("RTPEM" & int2str(i));
@@ -85,6 +99,8 @@ module MGCP_Test {
/* do a DLCX on all connections of the EP */
f_dlcx_ignore(valueof(ep));
}
+
+ f_init_vty();
}
testcase TC_selftest() runs on dummy_CT {