sgsn: add TC_attach_detach_check_subscriber_list
MS <-> SGSN: Attach
MS -> SGSN: Detach Req (Power off)
VTY -> SGSN: Check if MS is NOT in subscriber cache
Change-Id: I0956d54760f19ca556fa0d16ea4c5b96ac13f2fa
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 9632718..802c3e6 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1248,7 +1248,6 @@
vc_conn.done;
}
-
private function f_TC_hlr_location_cancel_request_update(charstring id) runs on BSSGP_ConnHdlr {
/* MS: perform regular attach */
f_TC_attach(id);
@@ -1365,7 +1364,26 @@
vc_conn.done;
}
+private function f_TC_attach_detach_check_subscriber_list(charstring id) runs on BSSGP_ConnHdlr {
+ f_TC_attach(id);
+ f_detach_mo(c_GMM_DTT_MO_GPRS, true, true);
+}
+testcase TC_attach_detach_check_subscriber_list() runs on test_CT {
+ /* MS <-> SGSN: Attach
+ * MS -> SGSN: Detach Req (Power off)
+ * VTY -> SGSN: Check if MS is NOT in subscriber cache
+ */
+ var BSSGP_ConnHdlr vc_conn;
+ var integer id := 33;
+ var charstring imsi := hex2str(f_gen_imsi(id));
+
+ f_init();
+ vc_conn := f_start_handler(refers(f_TC_attach_detach_check_subscriber_list), testcasename(), g_gb[0], id);
+ vc_conn.done;
+
+ f_vty_transceive_not_match(SGSNVTY, "show subscriber cache", pattern "* IMSI: {imsi}*");
+}
/* Attempt an attach, but loose the Identification Request (IMEI) */
private function f_TC_attach_no_imei_response(charstring id) runs on BSSGP_ConnHdlr {
@@ -1473,6 +1491,7 @@
execute( TC_attach_closed() );
execute( TC_attach_no_imei_response() );
execute( TC_attach_no_imsi_response() );
+ 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 );
execute( TC_hlr_location_cancel_request_unknown_subscriber_withdraw(), 10.0 );