pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36352?usp=email )


Change subject: pgw: Introduce test TC_gy_ccr_update_rejected
......................................................................

pgw: Introduce test TC_gy_ccr_update_rejected

Related: SYS#6845
Change-Id: Ie58ae2a5e870b183fa1c56c90c94f5eee56386e0
---
M pgw/PGW_Tests.ttcn
1 file changed, 42 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/52/36352/1

diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn
index 997c42d..ae65c4f 100644
--- a/pgw/PGW_Tests.ttcn
+++ b/pgw/PGW_Tests.ttcn
@@ -1079,6 +1079,37 @@
        vc_conn.done;
 }

+/* Test Gy CCR rejected with CCA Result-Code DIAMETER_AUTHORIZATION_REJECTED 
(5003) */
+private function f_TC_gy_ccr_update_rejected() runs on PGW_Session_CT {
+       var default d;
+
+       f_s5s8_create_session();
+
+       /* We should receive an update even if no traffic is sent: */
+       as_DIA_Gy_CCR(UPDATE_REQUEST);
+
+       g_pars.gy.cca_res_code := DIAMETER_AUTHORIZATION_REJECTED;
+
+       as_DIA_Gy_CCR(UPDATE_REQUEST);
+
+       f_sleep(3.0);
+
+       /* TODO: test here:
+        * f_ping4() fails
+        * f_delete_session() returns Request_rejected
+        */
+
+       setverdict(pass);
+}
+testcase TC_gy_ccr_update_rejected() runs on PGW_Test_CT {
+       var PGW_Session_CT vc_conn;
+       var SessionPars pars := valueof(t_SessionPars('001010123456789'H, 
"tun23"));
+       pars.gy.validity_time := 3; /* Grant access for 3 seconds, needs to be 
re-validated afterwards */
+       f_init();
+       vc_conn := f_start_handler(refers(f_TC_gy_ccr_update_rejected), pars);
+       vc_conn.done;
+}
+
 /* create a session, expect it to succeed */
 private function f_TC_s2b_createSession_v4_noapco() runs on PGW_Session_CT {
        var template (omit) APCO apco := omit;
@@ -1125,6 +1156,7 @@
        execute( TC_createSession_deleteSession() );
        execute( TC_deleteSession_unknown() );
        execute( TC_gy_charging_cc_time() );
+       execute( TC_gy_ccr_update_rejected() );
        execute( TC_s2b_createSession_v4_noapco() );
        execute( TC_s2b_createSession_v4_apco() );
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36352?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ie58ae2a5e870b183fa1c56c90c94f5eee56386e0
Gerrit-Change-Number: 36352
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to