hnbgw: Introduce test TC_hnb_register_duplicate_reuse_sctp_assoc
Change-Id: I09ce08917b590ecd6fdf93f8b564a0d53900c871
diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index b1868c2..d77a18f 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -681,6 +681,8 @@
f_shutdown_helper();
}
+/* Try to register the same HNB from 2 different concurrent connections. Second
+ * one should be rejected. */
testcase TC_hnb_register_duplicate() runs on test_CT {
g_num_hnbs := 2;
f_init();
@@ -690,6 +692,18 @@
f_shutdown_helper();
}
+/* Try to register the same HNB in the same connection already established, aka
+ * duplicate HNB Register Request. It should be accepted and new configuration
+ * applied. TS 25.469 8.2.4 */
+testcase TC_hnb_register_duplicate_reuse_sctp_assoc() runs on test_CT {
+ g_num_hnbs := 1;
+ f_init();
+ f_hnbap_register(0);
+ f_hnbap_register(0);
+ f_verify_talloc_count(HNBGWVTY, {"struct hnb_context"}, expect_count := 1);
+ f_shutdown_helper();
+}
+
/* Drop HNBAP conn (HNBAP DEREG) and reconnect it (HNBAP REG) using same SCTP association.
* Related: OS#5676, SYS#6113 */
testcase TC_hnb_reregister_reuse_sctp_assoc() runs on test_CT {
@@ -1431,6 +1445,7 @@
control {
execute(TC_hnb_register());
execute(TC_hnb_register_duplicate());
+ execute(TC_hnb_register_duplicate_reuse_sctp_assoc());
execute(TC_ranap_cs_initial_ue());
execute(TC_ranap_ps_initial_ue());
execute(TC_ranap_cs_initial_ue_empty_cr());