Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/11960


Change subject: HLR_Tests.ttcn: introduce TC_mo_sss_reject
......................................................................

HLR_Tests.ttcn: introduce TC_mo_sss_reject

As at the moment, OsmoHLR doesn't support "structured" SS, such
requests are being rejected. This test case aims to verify that.

Change-Id: I147b919d0242b3b44e39a4587bf1b4660fa58bd2
Related: OS#3651
---
M hlr/HLR_Tests.ttcn
M hlr/expected-results.xml
2 files changed, 51 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/60/11960/1

diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index 29af522..f7902be 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -995,6 +995,53 @@
        vc_EUSE.stop;
 }

+/**
+ * Test "Structured" Supplementary Services
+ *
+ * NOTE: at the moment, OsmoHLR doesn't support "structured" SS,
+ * so such requests are being rejected (actually ReturnError
+ * with GSM0480_ERR_CODE_FACILITY_NOT_SUPPORTED).
+ */
+private function f_TC_mo_sss_reject() runs on HLR_ConnHdlr {
+       var SS_FacilityInformation ss_req;
+
+       /* Prepare '*#21#' SS request */
+       ss_req := valueof(ts_SS_FACILITY_INVOKE(
+               invoke_id := 0,
+               op_code := SS_OP_CODE_INTERROGATE_SS,
+               ss_code := '21'O));
+
+       /* Send it towards HLR */
+       GSUP.send(valueof(ts_GSUP_PROC_SS_REQ(
+               g_pars.sub.imsi,
+               g_pars.ussd.sid,
+               OSMO_GSUP_SESSION_STATE_BEGIN,
+               enc_SS_FacilityInformation(ss_req))));
+
+       /* Expect ReturnError with FACILITY_NOT_SUPPORTED */
+       f_SS_expect(g_pars.sub.imsi,
+               g_pars.ussd.sid, OSMO_GSUP_SESSION_STATE_END,
+               tr_SS_FACILITY_RETURN_ERROR(0, 21));
+}
+testcase TC_mo_sss_reject() runs on test_CT {
+       var HLR_ConnHdlrPars pars;
+       var HLR_ConnHdlr vc_conn;
+       var HlrSubscriber sub;
+
+       f_init(false);
+
+       /* Create a random subscriber */
+       sub := valueof(t_Sub2G(f_rnd_imsi('26242'H),
+               '49161'H & f_rnd_hexstring(7, 9), "comp128v1"));
+       pars := valueof(t_Pars_sub(sub));
+       pars.ussd.sid := f_rnd_octstring(4);
+
+       f_vty_subscr_create(VTY, sub);
+       vc_conn := f_start_handler(refers(f_TC_mo_sss_reject), pars);
+       vc_conn.done;
+       f_vty_subscr_delete(VTY, sub);
+}
+

 /* TODO USSD:
    * MO USSD for IMSI of non-existant subscriber
@@ -1035,6 +1082,9 @@
        execute( TC_mo_ussd_euse() );
        execute( TC_mo_ussd_euse_continue() );
        execute( TC_mo_ussd_euse_defaultroute() );
+
+       /* "Structured" Supplementary Services */
+       execute( TC_mo_sss_reject() );
 };

 };
diff --git a/hlr/expected-results.xml b/hlr/expected-results.xml
index 5431b78..8a1ed26 100644
--- a/hlr/expected-results.xml
+++ b/hlr/expected-results.xml
@@ -17,4 +17,5 @@
   <testcase classname='HLR_Tests' name='TC_mo_ussd_euse' time='MASKED'/>
   <testcase classname='HLR_Tests' name='TC_mo_ussd_euse_continue' 
time='MASKED'/>
   <testcase classname='HLR_Tests' name='TC_mo_ussd_euse_defaultroute' 
time='MASKED'/>
+  <testcase classname='HLR_Tests' name='TC_mo_sss_reject' time='MASKED'/>
 </testsuite>

--
To view, visit https://gerrit.osmocom.org/11960
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I147b919d0242b3b44e39a4587bf1b4660fa58bd2
Gerrit-Change-Number: 11960
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <[email protected]>

Reply via email to