sgsn: add TC_attach_check_subscriber_list
MS <-> SGSN: Attach
VTY -> SGSN: Check if MS is in subscriber cache
Change-Id: If19073ef4a5b1e2219bd5184ae30d55ffb71844a
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 );