summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-11-28 06:02:22 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-11-28 06:02:36 +0700
commiteffab7cfd113db5684413ff9982504f64997af66 (patch)
treef62920f80ee0b818eda3d2cb6e28851e9784e07e
parentbc18afab589bdd7bb6e4e4956b76052b628fbc1b (diff)
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
-rw-r--r--hlr/HLR_Tests.ttcn50
-rw-r--r--hlr/expected-results.xml1
2 files changed, 51 insertions, 0 deletions
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 @@ testcase TC_mo_ussd_euse_defaultroute() runs on test_CT {
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 @@ control {
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>