laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33322 )
Change subject: mgw: Introduce test TC_auep_null ......................................................................
mgw: Introduce test TC_auep_null
Related: SYS#6481 Change-Id: I9395cd526cf626974fb0e2ed93ff5d95a433d8c0 --- M library/MGCP_Templates.ttcn M mgw/MGCP_Test.ttcn M mgw/expected-results.xml 3 files changed, 46 insertions(+), 0 deletions(-)
Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/library/MGCP_Templates.ttcn b/library/MGCP_Templates.ttcn index e5a05bc..3a5f139 100644 --- a/library/MGCP_Templates.ttcn +++ b/library/MGCP_Templates.ttcn @@ -94,6 +94,22 @@ ver := "1.0" };
+ template MgcpCommand ts_AUEP(MgcpTransId trans_id, charstring ep) := { + line := t_MgcpCmdLine("AUEP", trans_id, ep), + params := omit, + sdp := omit + } + + template MgcpResponse tr_AUEP_ACK := { + line := { + code := "200", + trans_id := ?, + string := "OK" + }, + params:= *, + sdp := omit + } + template MgcpCommand ts_CRCX(MgcpTransId trans_id, charstring ep, MgcpConnectionMode mode, MgcpCallId call_id, template SDP_Message sdp := omit) := { line := t_MgcpCmdLine("CRCX", trans_id, ep), params := { diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 0759006..7d01b97 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -686,6 +686,18 @@ } }
+ /* Send an AuditEndpoint message to the MGW */ + function f_auep(charstring ep_prefix) runs on dummy_CT { + var MgcpEndpoint ep := ep_prefix & "@" & c_mgw_domain; + var template MgcpCommand cmd; + var MgcpResponse resp; + + f_init(ep); + + cmd := ts_AUEP(get_next_trans_id(), ep); + resp := mgcp_transceive_mgw(cmd, tr_AUEP_ACK); + } + function f_crcx(charstring ep_prefix) runs on dummy_CT { var MgcpEndpoint ep := ep_prefix & "2@" & c_mgw_domain; var template MgcpCommand cmd; @@ -771,6 +783,12 @@ f_dlcx_ok(ep, call_id); }
+ /* test valid AUEP towards "null" endpoint */ + testcase TC_auep_null() runs on dummy_CT { + f_auep("null"); + setverdict(pass); + } + /* test valid CRCX without SDP */ testcase TC_crcx() runs on dummy_CT { f_crcx(c_mgw_ep_rtpbridge); @@ -3010,6 +3028,7 @@
control { execute(TC_selftest()); + execute(TC_auep_null()); execute(TC_crcx()); execute(TC_crcx_no_lco()); execute(TC_crcx_noprefix()); diff --git a/mgw/expected-results.xml b/mgw/expected-results.xml index 577b6e3..a4ce388 100644 --- a/mgw/expected-results.xml +++ b/mgw/expected-results.xml @@ -1,6 +1,7 @@ <?xml version="1.0"?> <testsuite name='Titan' tests='71' failures='8' errors='0' skipped='0' inconc='0' time='MASKED'> <testcase classname='MGCP_Test' name='TC_selftest' time='MASKED'/> + <testcase classname='MGCP_Test' name='TC_auep_null' time='MASKED'/> <testcase classname='MGCP_Test' name='TC_crcx' time='MASKED'/> <testcase classname='MGCP_Test' name='TC_crcx_no_lco' time='MASKED'/> <testcase classname='MGCP_Test' name='TC_crcx_noprefix' time='MASKED'/>