lynxis lazus has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27569?usp=email )

Change subject: hlr: add imsi unknown cause test case
......................................................................

hlr: add imsi unknown cause test case

Check if the reject-cause is correct implement when the subscriber
couldn't found.

Depends-on: Icea39020c23fbbea9e92847df76af8986fdbf48a (osmo-hlr)
Change-Id: I87c3a2d7304b81cfc11a364d933567e1a080b99a
---
M hlr/HLR_Tests.ttcn
1 file changed, 35 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  daniel: Looks good to me, but someone else must approve
  Jenkins Builder: Verified




diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index e99011d..794ef9b 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -152,6 +152,7 @@
        f_vty_set_prompts(VTY);
        f_vty_transceive(VTY, "enable");
        f_vty_config(VTY, "mslookup", "no mdns bind");
+       f_vty_config(VTY, "hlr", "reject-cause not-found imsi-unknown");
 }

 private altstep as_Tguard() runs on test_CT {
@@ -987,6 +988,7 @@
        vc_conn := f_start_handler(refers(f_TC_ul_unknown_imsi), pars);
        vc_conn.done;
 }
+
 testcase TC_gsup_ul_unknown_imsi_via_proxy() runs on test_CT {
        var hexstring imsi := f_rnd_imsi('26242'H);
        var HLR_ConnHdlrPars pars := valueof(t_Pars_via_proxy(imsi));
@@ -997,6 +999,25 @@
        vc_conn.done;
 }

+/* Test if the HLR can be configured to a different error code if the 
subscriber can't be found.
+ * E.g. on event networks the HLR should return Roaming Not Allowed to unknown 
subscribers instead
+ * of Subscriber Unknown in HLR.
+ */
+private function f_TC_ul_unknown_imsi_roaming_not_allowed() runs on 
HLR_ConnHdlr {
+       f_vty_config(VTY, "hlr", "reject-cause not-found roaming-not-allowed");
+       f_perform_UL(g_pars.sub.imsi, ?, 13, source_name := g_pars.source_name);
+       setverdict(pass);
+}
+testcase TC_gsup_ul_unknown_imsi_roaming_not_allowed() runs on test_CT {
+       var hexstring imsi := f_rnd_imsi('26242'H);
+       var HLR_ConnHdlrPars pars := valueof(t_Pars(imsi));
+       var HLR_ConnHdlr vc_conn;
+
+       f_init(false);
+       vc_conn := 
f_start_handler(refers(f_TC_ul_unknown_imsi_roaming_not_allowed), pars);
+       vc_conn.done;
+}
+
 /* test UL for a number of different subscriber cases (algo, 2g/3g, ...) */
 private function f_TC_gsup_ul() runs on HLR_ConnHdlr {
        var GSUP_PDUs res;
@@ -2076,6 +2097,7 @@
        execute( TC_gsup_sai_eps() );
        execute( TC_gsup_ul_unknown_imsi() );
        execute( TC_gsup_ul_unknown_imsi_via_proxy() );
+       execute( TC_gsup_ul_unknown_imsi_roaming_not_allowed() );
        execute( TC_gsup_sai_err_unknown_imsi() );
        execute( TC_gsup_ul() );
        execute( TC_gsup_ul_via_proxy() );

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27569?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I87c3a2d7304b81cfc11a364d933567e1a080b99a
Gerrit-Change-Number: 27569
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus <lyn...@fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillm...@sysmocom.de>
Gerrit-Reviewer: fixeria <vyanits...@sysmocom.de>
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: lynxis lazus <lyn...@fe80.eu>
Gerrit-Reviewer: neels <nhofm...@sysmocom.de>
Gerrit-MessageType: merged

Reply via email to