pespin has submitted this change. ( 
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

This test currently fails because open5gs-smfd is not triggering the
tear down in smf_gy_handle_cca_update_request().

Related: SYS#6845
Change-Id: Ie58ae2a5e870b183fa1c56c90c94f5eee56386e0
---
M pgw/PGW_Tests.ttcn
M pgw/expected-results.xml
2 files changed, 43 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  osmith: Looks good to me, but someone else must approve




diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn
index 997c42d..3c4bef2 100644
--- a/pgw/PGW_Tests.ttcn
+++ b/pgw/PGW_Tests.ttcn
@@ -1079,6 +1079,34 @@
        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);
+
+       /* Answer next CCR[Update] with CCA Reject: */
+       g_pars.gy.cca_res_code := DIAMETER_AUTHORIZATION_REJECTED;
+       as_DIA_Gy_CCR(UPDATE_REQUEST);
+
+       /* Expect PGW to tear down the connection as a result: */
+       as_DIA_Gx_CCR(TERMINATION_REQUEST);
+       as_DIA_Gy_CCR(TERMINATION_REQUEST);
+
+       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 +1153,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() );
 }
diff --git a/pgw/expected-results.xml b/pgw/expected-results.xml
index 20c073b..913f669 100644
--- a/pgw/expected-results.xml
+++ b/pgw/expected-results.xml
@@ -7,6 +7,7 @@
   <testcase classname='PGW_Tests' name='TC_createSession_deleteSession' 
time='MASKED'/>
   <testcase classname='PGW_Tests' name='TC_deleteSession_unknown' 
time='MASKED'/>
   <testcase classname='PGW_Tests' name='TC_gy_charging_cc_time' time='MASKED'/>
+  <testcase classname='PGW_Tests' name='TC_gy_ccr_update_rejected' 
time='MASKED'/>
   <testcase classname='PGW_Tests' name='TC_s2b_createSession_v4_noapco' 
time='MASKED'/>
   <testcase classname='PGW_Tests' name='TC_s2b_createSession_v4_apco' 
time='MASKED'/>
 </testsuite>

--
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: 2
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to