Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9581 )

Change subject: sgsn: add TC_attach_check_subscriber_list
......................................................................

sgsn: add TC_attach_check_subscriber_list

MS <-> SGSN: Attach
VTY -> SGSN: Check if MS is in subscriber cache

Change-Id: If19073ef4a5b1e2219bd5184ae30d55ffb71844a
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 22 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index f812fbe..4b6fc4c 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1475,6 +1475,27 @@
        vc_conn.done;
 }

+private function f_sgsn_vty_destroy_subscriber_imsi(TELNETasp_PT pt, 
charstring imsi) {
+       f_vty_transceive(pt, "update-subscriber imsi " & imsi & " destroy");
+}
+
+testcase TC_attach_check_subscriber_list() runs on test_CT {
+       /* MS <-> SGSN: Attach
+        * VTY -> SGSN: Check if MS is in subscriber cache
+        */
+       var BSSGP_ConnHdlr vc_conn;
+       var integer id := 34;
+       var charstring imsi := hex2str(f_gen_imsi(id));
+
+       f_init();
+       f_sleep(1.0);
+       vc_conn := f_start_handler(refers(f_TC_attach), testcasename(), 
g_gb[0], id);
+       vc_conn.done;
+
+       f_vty_transceive_match(SGSNVTY, "show subscriber cache", pattern "* 
IMSI: {imsi}*");
+       f_sgsn_vty_destroy_subscriber_imsi(SGSNVTY, imsi);
+}
+
 control {
        execute( TC_attach() );
        execute( TC_attach_mnc3() );
@@ -1490,6 +1511,7 @@
        execute( TC_attach_closed() );
        execute( TC_attach_no_imei_response() );
        execute( TC_attach_no_imsi_response() );
+       execute( TC_attach_check_subscriber_list(), 10.0 );
        execute( TC_attach_detach_check_subscriber_list(), 10.0 );
        execute( TC_hlr_location_cancel_request_update(), 10.0 );
        execute( TC_hlr_location_cancel_request_withdraw(), 10.0 );

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If19073ef4a5b1e2219bd5184ae30d55ffb71844a
Gerrit-Change-Number: 9581
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lyn...@fe80.eu>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder

Reply via email to