ns2: add TC_sns_sgsn_del to test SNS DEL on the SGSN side
Test the SNS DEL procedure when ns2 is operating the SGSN side.
Change-Id: If519da5212470957b922c569b2b8e5a50e12a8a8
diff --git a/ns/NS_Tests.ttcn b/ns/NS_Tests.ttcn
index e9c3bf4..b45ab91 100644
--- a/ns/NS_Tests.ttcn
+++ b/ns/NS_Tests.ttcn
@@ -730,6 +730,27 @@
f_clean_ns_codec();
}
+testcase TC_sns_sgsn_del() runs on RAW_Test_CT {
+ g_handle_rx_alive := true;
+ f_init_vty();
+ f_init_ns_codec(mp_nsconfig);
+ f_init_ns_codec(mp_nsconfig, 1);
+ f_outgoing_sns_size(max_nsvcs := 4, num_ip := 4);
+ f_outgoing_sns_config();
+ f_incoming_sns_config();
+ activate(as_rx_alive_tx_ack());
+
+ f_vty_config2(NSVTY, {"ns", "nse " & int2str(g_nsconfig.nsei)}, "ip-sns-bind local2");
+ f_incoming_sns_add(idx_add := 1);
+ as_rx_alive_tx_ack(oneshot := true, idx := 1);
+
+ /* delete the endpoint */
+ f_vty_config2(NSVTY, {"ns", "nse " & int2str(g_nsconfig.nsei)}, "no ip-sns-bind local2");
+ f_incoming_sns_del(idx_del := 1);
+
+ setverdict(pass);
+ f_clean_ns_codec();
+}
control {
if (mp_dialect == NS2_DIALECT_STATIC_RESETBLOCK or mp_dialect == NS2_DIALECT_IPACCESS) {
@@ -790,6 +811,7 @@
if (mp_sns_role == SNS_ROLE_SGSN) {
execute( TC_sns_sgsn_config_success() );
execute( TC_sns_sgsn_add() );
+ execute( TC_sns_sgsn_del() );
}
}
}