sgsn: add TC_iu_attach_encr with UEA > 0
Test new osmo-sgsn Iu attach with UEA (encryption) enabled
Related: SYS#5516
Depends: I27e8e0078c45426bf227bb44aac82a4875d18d0f (osmo-sgsn)
Change-Id: I1a7c3b156830058c43f15f55883ea301d2d01d5f
diff --git a/sgsn/SGSN_Tests_Iu.ttcn b/sgsn/SGSN_Tests_Iu.ttcn
index 2b63b4e..236a6a7 100644
--- a/sgsn/SGSN_Tests_Iu.ttcn
+++ b/sgsn/SGSN_Tests_Iu.ttcn
@@ -1,6 +1,7 @@
module SGSN_Tests_Iu {
import from Osmocom_Types all;
+import from Osmocom_VTY_Functions all;
import from SGSN_Tests all;
@@ -36,6 +37,29 @@
f_cleanup();
}
+testcase TC_iu_attach_encr() runs on test_CT {
+ /* MS -> SGSN: Attach Request IMSI
+ * MS <- SGSN: Identity Request IMEI
+ * MS -> SGSN: Identity Response IMEI
+ * MS <- SGSN: Auth Request
+ * MS -> SGSN: Auth Response
+ * MS <- SGSN: Security Mode Command
+ * MS -> SGSN: Security Mode Complete
+ * hNodeB <- SGSN: Common Id
+ * MS <- SGSN: Attach Accept
+ * MS -> SGSN: Attach Complete
+ */
+ var BSSGP_ConnHdlr vc_conn;
+ g_ranap_enable := true;
+ f_init();
+ f_vty_config(SGSNVTY, "sgsn", "encryption uea 1 2");
+ f_sleep(1.0);
+ vc_conn := f_start_handler(refers(f_TC_iu_attach), testcasename(), g_gb, 1001, expect_ciph := true);
+ vc_conn.done;
+ f_vty_config(SGSNVTY, "sgsn", "encryption uea 0");
+ f_cleanup();
+}
+
private function f_TC_iu_attach_geran_rau(charstring id) runs on BSSGP_ConnHdlr {
var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip));
@@ -85,6 +109,7 @@
control {
execute( TC_iu_attach() );
+ execute( TC_iu_attach_encr() );
execute( TC_iu_attach_geran_rau() );
execute( TC_geran_attach_iu_rau() );
}