Commit 94219e21 authored by Michele Carignani's avatar Michele Carignani
Browse files

Merge branch 'nxw' into 'master'

Update to MEC010-2 v2.0.10

See merge request mec/MEC-tests!11
parents 07806579 0d39dfd5
Loading
Loading
Loading
Loading
+94 −0
Original line number Original line Diff line number Diff line
/*
Copyright (c) ETSI 2018.

This software is subject to copyrights owned by ETSI. Non-exclusive permission
is hereby granted, free of charge, to copy, reproduce and amend this file
under the following conditions: It is provided "as is", without warranty of any
kind, expressed or implied.

ETSI shall never be liable for any claim, damages, or other liability arising
from its use or inability of use.This permission does not apply to any documentation
associated with this file for which ETSI keeps all rights reserved. The present
copyright notice shall be included in all copies of whole or part of this
file and shall not imply any sub-license right.
*/
Package MEC010_2_MEO_GRANT_BI {
   
   import all from MEC_Common;
   
   Test Purpose {
      TP Id "TP_MEC_MEO_GRANT_001_BR"         //Negative case 400 Bad request
      
      Test objective 
         "Check that MEO responds with an error when it receives 
         a malformed request when a new grant request is performed"
      
      Reference "ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.2",
                "ETSI GS MEC 010-2 2.0.10, Table 6.2.4.4.2-1"       //Grant
                
      Config Id Config_MEC_3
      
      PICS Selection PIC_GRANTS_MANAGEMENT

      Initial conditions  with {
         the IUT entity having a app_instance containing
            appInstanceID indicating value APP_INSTANCE_ID;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing 
               uri indicating value "/granting/v1/grants",
               body containing
                  GrantRequest containing
                     appInstanceId set to APP_INSTANCE_ID,
                     appLcmOpOccId set to any_value,
                     appDId set to any_value,
                     operationERROR set to OPERATION_TYPE   //parameter should be named operation not operationType
                     attribute _links
                  ;
               ;
            ; from the MEPM entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "400 Bad Request"
            ; to the MEPM entity
         }
      }       
   }   
 
   Test Purpose {
      TP Id "TP_MEC_MEO_GRANTS_003_NF"         //Negative case 404 Not found
      
      Test objective 
         "Check that MEO responds with an error when it receives 
         a request for returning a grant referred with a wrong ID"
      
      Reference "ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.2"
              
      Config Id Config_MEC_3
      PICS Selection PIC_GRANTS_MANAGEMENT

      Initial conditions  with {
         the IUT entity "not" having a grant containing
            id indicating value GRANTING_ID
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/granting/v1/grants/{GRANTING_ID}" 
            ; from the MEPM entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEPM entity
         }
      }       
   }
}
+201 −0
Original line number Original line Diff line number Diff line
/*
Copyright (c) ETSI 2018.

This software is subject to copyrights owned by ETSI. Non-exclusive permission
is hereby granted, free of charge, to copy, reproduce and amend this file
under the following conditions: It is provided "as is", without warranty of any
kind, expressed or implied.

ETSI shall never be liable for any claim, damages, or other liability arising
from its use or inability of use.This permission does not apply to any documentation
associated with this file for which ETSI keeps all rights reserved. The present
copyright notice shall be included in all copies of whole or part of this
file and shall not imply any sub-license right.
*/
Package MEC010_2_MEO_GRANT_BV {
   
   import all from MEC_Common;
   
 
   Test Purpose {
      TP Id "TP_MEC_MEO_GRANT_001_OK"
      
      Test objective 
         "Check that MEO sends a synchronous grant response when a grant request is requested"
      
      Reference "ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.1",
              "ETSI GS MEC 010-2 2.0.10, Table 6.2.4.2.2-1",      //GrantRequest
              "ETSI GS MEC 010-2 2.0.10, Table 6.2.4.4.2-1"       //Grant
              
      Config Id Config_MEC_3
      PICS Selection PIC_GRANTS_MANAGEMENT 

      Initial conditions  with {
         the IUT entity having a app_instance containing
            appInstanceID indicating value APP_INSTANCE_ID;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing 
               uri indicating value "/granting/v1/grants",
               body containing
                  GrantRequest containing
                     appInstanceId set to APP_INSTANCE_ID,
                     appLcmOpOccId set to any_value,
                     appDId set to any_value,
                     operation set to OPERATION_TYPE   //Shall be one from - INSTANTIATE - OPERATE - TERMINATE
                     attribute _links
                  ;
               ;
            ;
            from the MEPM entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "201 Created",
               body containing 
                  Grant containing
                     id set to any_value,
                     appInstanceId set to APP_INSTANCE_ID,
                     appLcmOpOccId set to any_value,
                     attribute _links
                  ;
               ;
            ; to the MEPM entity
         }
      }
   }
 

   
   Test Purpose {
      TP Id "TP_MEC_MEO_GRANT_002_OK"
      
      Test objective 
         "Check that MEO sends a asynchronous grant response when a grant request is requested"
      
      Reference "ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.1",
              "ETSI GS MEC 010-2 2.0.10, Table 6.2.4.2.2-1"      //GrantRequest
              
              
      Config Id Config_MEC_3
      PICS Selection PIC_GRANTS_MANAGEMENT 

      Initial conditions  with {
         the IUT entity having a app_instance containing
            appInstanceID indicating value APP_INSTANCE_ID;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing 
               uri indicating value "/granting/v1/grants",
               body containing
                  GrantRequest containing
                     appInstanceId set to APP_INSTANCE_ID,
                     appLcmOpOccId set to any_value,
                     appDId set to any_value,
                     operation set to OPERATION_TYPE   //Shall be one from - INSTANTIATE - OPERATE - TERMINATE
                     attribute _links
                  ;
               ;
            ;
            from the MEPM entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "202 Accepted",
               headers containing 
                  Location set to "/granting/v1/grants/{GRANTING_ID}"
               ;
            ; to the MEPM entity
         }
      }
   }
  

   Test Purpose {
      TP Id "TP_MEC_MEO_GRANT_003_OK"
      
      Test objective 
         "Check that MEO sends the status of a grant request when a query on a granting ID is performed"
      
      Reference "ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.2"
              
              
              
      Config Id Config_MEC_3
      PICS Selection PIC_GRANTS_MANAGEMENT 

      Initial conditions  with {
         the IUT entity having a grant containing
            id indicating value GRANTING_ID;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing 
               uri indicating value "/granting/v1/grants/{GRANTING_ID}"
            ;
            from the MEPM entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "202 Accepted",
               headers containing 
                  Location set to "/granting/v1/grants/{GRANTING_ID}"
               ;
            ; to the MEPM entity
         }
      }
   }   


   Test Purpose {
      TP Id "TP_MEC_MEO_GRANT_004_OK"
      
      Test objective 
         "Check that MEO sends the status of a grant request when a query on a granting ID is performed"
      
      Reference "ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.2",
                "ETSI GS MEC 010-2 2.0.10, Table 6.2.4.4.2-1"       //Grant
              
              
              
      Config Id Config_MEC_3
      PICS Selection PIC_GRANTS_MANAGEMENT 

      Initial conditions  with {
         the IUT entity having a grant containing
            id indicating value GRANTING_ID;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing 
               uri indicating value "/granting/v1/grants/{GRANTING_ID}"
            ;
            from the MEPM entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "200 OK",
               body containing
                  Grant containing
                     id set to GRANTING_ID,
                     appInstanceId set to any_value,
                     appLcmOpOccId set to any_value,
                     attribute _links
                  ;
               ;   
            ; to the MEPM entity
         }
      }
   }   

}
+31 −31
Original line number Original line Diff line number Diff line
@@ -203,7 +203,7 @@ Package MEC010_2_MEO_MM1_PKGM_BV {
      }
      }
   }
   }
 
 
 //TODO FIX SPACES

   Test Purpose {
   Test Purpose {
      TP Id "TP_MEC_MEO_PKGM_005_OK"
      TP Id "TP_MEC_MEO_PKGM_005_OK"
	      
	      
+5 −4
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@ Package MEC010_2_MEPM_MM3_PKGM_BI {
   
   
   import all from MEC_Common;
   import all from MEC_Common;


   
   Test Purpose {
   Test Purpose {
      TP Id "TP_MEC_MEPM_PKGM_001_BR"         //Negative case 400 Bad request
      TP Id "TP_MEC_MEPM_PKGM_001_BR"         //Negative case 400 Bad request
      
      
@@ -50,6 +51,7 @@ Package MEC010_2_MEPM_MM3_PKGM_BI {
      }       
      }       
   }   
   }   


 
   Test Purpose {
   Test Purpose {
      TP Id "TP_MEC_MEPM_PKGM_002_NF"         //Negative case 404 Not found
      TP Id "TP_MEC_MEPM_PKGM_002_NF"         //Negative case 404 Not found
      
      
@@ -85,9 +87,6 @@ Package MEC010_2_MEPM_MM3_PKGM_BI {
   }
   }
   
   
   
   

   
   
/*   
/*   
   Test Purpose {
   Test Purpose {
      TP Id "TP_MEC_MEPM_MM3_PKGM_002a_BO_BI_002"         //Negative case 401 Unauthorized - no token
      TP Id "TP_MEC_MEPM_MM3_PKGM_002a_BO_BI_002"         //Negative case 401 Unauthorized - no token
@@ -709,6 +708,7 @@ Package MEC010_2_MEPM_MM3_PKGM_BI {
   }     
   }     
 */
 */



   Test Purpose {
   Test Purpose {
      TP Id "TP_MEC_MEPM_PKGM_007_NF"
      TP Id "TP_MEC_MEPM_PKGM_007_NF"
      
      
@@ -856,4 +856,5 @@ Package MEC010_2_MEPM_MM3_PKGM_BI {
         }
         }
      }
      }
   }  
   }  

}
}
+3 −3
Original line number Original line Diff line number Diff line
@@ -12,13 +12,13 @@ associated with this file for which ETSI keeps all rights reserved. The present
copyright notice shall be included in all copies of whole or part of this
copyright notice shall be included in all copies of whole or part of this
file and shall not imply any sub-license right.
file and shall not imply any sub-license right.
*/
*/
Package MEC_COMMON_BI {
Package MEC_ANY_BI {
   
   
   import all from MEC_Common;
   import all from MEC_Common;
   
   
   
   
   Test Purpose {
   Test Purpose {
      TP Id "TP_MEC_COMMON_001_NT"         //Negative case 401 Unauthorized - no token
      TP Id "TP_MEC_ANY_001_NT"         //Negative case 401 Unauthorized - no token
      
      
      Test objective 
      Test objective 
         "Check that a MEC API provider responds with an error when it receives 
         "Check that a MEC API provider responds with an error when it receives 
@@ -49,7 +49,7 @@ Package MEC_COMMON_BI {
   }
   }
   
   
   Test Purpose {
   Test Purpose {
      TP Id "TP_MEC_COMMON_001_WT"         //Negative case 401 Unauthorized - wrong token
      TP Id "TP_MEC_ANY_001_WT"         //Negative case 401 Unauthorized - wrong token
      
      
      Test objective 
      Test objective 
         "Check that a MEC API provider responds with an error when it receives 
         "Check that a MEC API provider responds with an error when it receives 
Loading