Commit b916d21c authored by juvancic's avatar juvancic
Browse files

Merge branch 'develop' of

https://forge.etsi.org/gitlab/DIAMETER/DiameterShDh.git into develop

Conflicts:
	ttcn/DiameterShDh_TestCases.ttcn3
parents 9c2ff09c 667f4e38
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
module DiameterShDh_PICS {
}
 No newline at end of file
    
    /**
     * @desc Does IUT acts as the HSS? 
     * @see  ETSI TS 103 289-1 A.2/1 
     */
    modulepar boolean PICS_HSS_IUT := false;
    
    /**
     * @desc Does IUT acts as the AS? 
     * @see  ETSI TS 103 289-1 A.2/1 
     */
    modulepar boolean PICS_AS_IUT := false;
    
} // End of module DiameterShDh_PICS 
 No newline at end of file
+72 −72
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ module DiameterShDh_Steps {
            }
            
            f_DiameterSh_init();
            f_preambleDiameterBaseServer(c_applIdSh);
            f_preambleDiameterBaseServer(c_applId3GPPShDh);
            v_def_diameter_catchEvent := activate (a_diameter_event());
            
            //delay before preamble is done - SIP starts with MESSAGE, INVITE request later
@@ -93,7 +93,7 @@ module DiameterShDh_Steps {
            }
    
            f_DiameterSh_init();
			f_preambleDiameterBaseServer(c_applIdSh);
            f_preambleDiameterBaseServer(c_applId3GPPShDh);
            v_def_diameter_catchEvent := activate (a_diameter_event());
    
            //delay before preamble is done - SIP starts with MESSAGE, INVITE request later
@@ -109,7 +109,7 @@ module DiameterShDh_Steps {
            }
    
            f_DiameterSh_init();
			f_preambleDiameterBaseServer(c_applIdSh);
            f_preambleDiameterBaseServer(c_applId3GPPShDh);
            v_def_diameter_catchEvent := activate (a_diameter_event());
    
            //delay before preamble is done - SIP starts with MESSAGE, INVITE request later
@@ -125,7 +125,7 @@ module DiameterShDh_Steps {
            }

            f_DiameterSh_init();
			f_preambleDiameterBaseServer(c_applIdSh);
            f_preambleDiameterBaseServer(c_applId3GPPShDh);
            v_def_diameter_catchEvent := activate (a_diameter_event());

            //delay before preamble is done - SIP starts with MESSAGE, INVITE request later
+1185 −1177
Original line number Diff line number Diff line
@@ -48,10 +48,11 @@ module DiameterShDh_TCFunctions {
                               md_uDR(
                                      vc_sessionId,
                                      md_udrBodyAvps(
                                                     m_vendor_Specific_Appl_Id_Sh,
                                                     vc_originHost,                 // containing an Origin-Host AVP
                                                     vc_originRealm,                // containing an Origin-Realm AVP
                                                     vc_destinationRealm            // containing a Destination-Realm AVP
                                                                                    // not containing a User-Identity AVP
                                                                                    // Containing s Data-Reference AVP
                                                    )
                                     )
                    );
@@ -59,16 +60,22 @@ module DiameterShDh_TCFunctions {
                    f_awaiting_UDA(
                                   mdw_uDA( 
                                           vc_sessionId,                            // containing a Session-ID AVP
                                           mdw_udaBodyAvps(
                                           mw_UDA_ResulFaile(
                                                             mw_resultCode(
                                                                           DIAMETER_MISSING_AVP_E      // containing a Result-Code AVP
                                                                                                       //     indicating DIAMETER_MISSING_AVP
                                                                           ),
                                                             vc_originHost_IUT,       // containing an Origin-Host AVP
                                                           vc_originRealm_IUT
                        )))
                    );
                                                             vc_originRealm_IUT,
                                                             {
                                                              mw_failed(              // containing a Failed AVP
                                                                        {
                                                                          mw_avpType( //     indicating missing Visited-Network-Identifier AVP 
                                                                                     mw_aVP_Header_any_Code(
                                                                                                            c_user_Identity_AVP_Code
                                                              ))})
                                                             }
                    )));

                    f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); 

@@ -94,11 +101,12 @@ module DiameterShDh_TCFunctions {
                               md_uDR(
                                      vc_sessionId,
                                      md_udrBodyAvps(
													 m_vendor_Specific_Appl_Id_Sh,
													 m_specific_user_Identity(m_public_user_identity),
                                                     vc_originHost,                 // containing an Origin-Host AVP
                                                     vc_originRealm,                // containing an Origin-Realm AVP
													 vc_destinationRealm            // containing a Destination-Realm AVP
                                                     vc_destinationRealm,           // containing a Destination-Realm AVP
                                                     m_specific_user_Identity(
                                                                              m_public_user_identity
                                                                             )
                                                    )
                                     )
                    );
+8 −9
Original line number Diff line number Diff line
@@ -78,21 +78,20 @@ module DiameterShDh_Templates {
                
                template Vendor_Specific_Appl_Id_AVP m_vendor_Specific_Appl_Id_Sh 
                  modifies m_vendor_Specific_Appl_Id_dummy := {
                    aVP_Header := m_aVP_Header_Mbit1(c_vendor_Specific_Appl_Id_AVP_Code, 12+12),
                    vendor_Id := {m_vendorId(c_vendId3gpp)},
                    auth_Application_Id := {m_authApplicationId(c_applIdSh)},
                    auth_Application_Id := {m_authApplicationId(c_applId3GPPShDh)},
                    acct_Application_Id := omit
                }
                
                template (value) Public_Identity_AVP m_public_user_identity := {
                    aVP_Header :=  m_aVP_Header_Mbit1(c_wildcarded_Public_Identity_AVP_Code),
					public_Identity_AVP := PX_public_user_identity
                    aVP_Data := PX_public_user_identity
                }
                
                template (value) User_Identity_AVP m_specific_user_Identity (
                	in template (value) Public_Identity_AVP p_Public_Identity_AVP
                                                                             in template (value) Public_Identity_AVP p_public_identity
                ) modifies m_user_Identity_dummy := {
					public_Identity_AVP := m_public_user_identity
                    public_Identity_AVP := p_public_identity
                }
            }
            
@@ -113,7 +112,7 @@ module DiameterShDh_Templates {
                                            in template (value) Session_Id_AVP  p_sessionId,
                                            in template (value) UDR_Body_AVP    p_udrBody
            ) modifies m_UDR_dummy := {
                header := m_diameterHeaderReq_dummy(UDR_E, c_applIdSh),
                header := m_diameterHeaderReq_dummy(UDR_E, c_applId3GPPShDh),
                session_Id  := p_sessionId,
                uDR_Body    := p_udrBody
            } // End of template md_uDR
@@ -162,7 +161,7 @@ module DiameterShDh_Templates {
                                               template (present) Session_Id_AVP  p_sessionId,
                                               template (present) UDR_Body_AVP    p_udrBody
            ) modifies mw_UDR_dummy := {
                header      := mw_diameterHeaderReq_dummy(UDR_E, c_applIdSh),
                header      := mw_diameterHeaderReq_dummy(UDR_E, c_applId3GPPShDh),
                session_Id  := p_sessionId,
                uDR_Body    := p_udrBody
            } // End of template mdw_uDR
+101 −27
Original line number Diff line number Diff line
@@ -72,7 +72,11 @@ module DiameterShDh_TestCases {
                    // Local variables
                    var DiameterShDh v_diameterSh_as; 
                        
                    //TODO Test control - PICS
                    // Test control
                    if (not PICS_HSS_IUT) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_HSS_IUT' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Sh_asUp(v_diameterSh_as);
@@ -85,10 +89,11 @@ module DiameterShDh_TestCases {
                        
                    f_cf_1Sh_asDown(v_diameterSh_as);
                        
                } // End of testcase TC_CX_HSS_MS_01 
                } // End of testcase TC_SH_HSS_MS_01 
                
            } // End of group TP_HSS_Role_MS 
            

            group TP_HSSRole_UserData {
                
                /**
@@ -2384,11 +2389,6 @@ module DiameterShDh_TestCases {
					// Local variables
					 var DiameterShDh v_diameterSh_as; 

					//TODO Test control - PICS
            
					// Test component configuration
					f_cf_1Sh_asUp(v_diameterSh_as);
        
					// Start
					v_diameterSh_as.start(f_TC_SH_HSS_PU_21());

@@ -2401,7 +2401,9 @@ module DiameterShDh_TestCases {
                
            } // End of group TP_HSSRole_ProfileUpdate
            
            group TP_HSSRole_SubscriptionNofification {

            
            group TP_HSSRole_SubscriptionNofification { //Sh Messages
                
                /**
                 * @desc    Verify that the IUT processes an SN-Request and sends corresponding SN-Answer.
@@ -2440,7 +2442,11 @@ module DiameterShDh_TestCases {
                    // Local variables
                    var DiameterShDh v_diameterSh_as; 
                    
                    //TODO Test control - PICS
                    // Test control
                    if (not PICS_AS_IUT) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_HSS_IUT' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Sh_asUp(v_diameterSh_as);
@@ -2488,7 +2494,11 @@ module DiameterShDh_TestCases {
                    // Local variables
                    var DiameterShDh v_diameterSh_as; 

                    //TODO Test control - PICS
                    // Test control
                    if (not PICS_AS_IUT) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_HSS_IUT' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Sh_asUp(v_diameterSh_as);
@@ -2552,6 +2562,69 @@ module DiameterShDh_TestCases {
        group TP_AS_Role { // §5.2.2.2
        
            group TP_ASRole_MessageSyntax {
                
                /**
                 * @desc    Verify that the IUT sends the appropriate Result-Code AVP when mandatory User-Identity AVP is absent.
                 * <pre>
                 * Pics Selection: PICS_AS_IUT
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives a UD-Request
                 *                containing a Session-ID AVP
                 *                containing a Vendor-Specific-Application-Id AVP
                 *                containing an Auth-Session-State AVP
                 *                containing an Origin-Host AVP
                 *                containing an Origin-Realm AVP
                 *                containing a Destination-Realm AVP
                 *                not containing a User-Identity AVP
                 *                containing a Data-Reference AVP
                 *        }
                 *        then {
                 *            the IUT sends a UD-Answer 
                 *                containing a Session-ID AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_MISSING_AVP
                 *                containing a Vendor-Specific-Application-Id AVP
                 *                containing an Auth-Session-State AVP
                 *                containing an Origin-Host AVP
                 *                containing an Origin-Realm AVP
                 *                containing a Failed AVP
                 *                    indicating missing Information Element
                 *        }
                 *     }
                 * </pre>
                 * 
                 * @version    0.0.6
                 * @see        ETSI TS 103 571-2 TP_SH_AS_MS_01
                 */
                testcase TC_SH_AS_MS_01() runs on DiameterShDh system TestAdapter { 
                    // Local variables
                    var DiameterShDh v_diameterSh_as; 
                    
                    // Test control
                    if (not PICS_AS_IUT) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_HSS_IUT' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Sh_asUp(v_diameterSh_as);
                    
                    // Start
                    v_diameterSh_as.start(f_TC_SH_AS_MS_01()); 
                        
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                        
                    f_cf_1Sh_asDown(v_diameterSh_as);
                        
                } // End of testcase TC_SH_AS_MS_01 
                
            } // End of group TP_ASRole_MessageSyntax
            
            group TP_ASRole_UserData{
@@ -2589,6 +2662,7 @@ module DiameterShDh_TestCases {
            group TP_SLFRole_PushNotification{
            } // End of group TP_SLFRole_PushNotification
        

        } // End of group TP_SLF_Role
        
        group TP_AS_Role { // §5.2.3.2