From 49bb4b499f343effd5b234ba3553bad092dd9b88 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Tue, 5 Jun 2018 16:28:36 +0200 Subject: 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 --- sgsn/SGSN_Tests.ttcn | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'sgsn') diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 96327180..802c3e6a 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -1248,7 +1248,6 @@ testcase TC_attach_second_attempt() runs on test_CT { 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 @@ testcase TC_hlr_location_cancel_request_unknown_subscriber_update() runs on test 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 @@ control { 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 ); -- cgit v1.2.3