Commit 6132362d authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Merge branch 'v2.2.1-dev' into 'master'

Fix: https://forge.etsi.org/rep/mec/gs032p2-test-purposes/issues/6 - Syntax...

Closes #6

See merge request !23
parents 1b0b77e9 eb7ae6c2
Loading
Loading
Loading
Loading
+6 −16
Original line number Original line Diff line number Diff line
/*
/*
Copyright (c) ETSI 2018.
Copyright (c) ETSI 2018-2021.

Released under BSD 3-clause license. For more information visit https://forge.etsi.org/legal-matters
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 MEC_MEX_ANY_BI {
Package MEC_MEC009_MEX_ANY_BI {
   
   
   import all from MEC_Common;
   import all from MEC_Common;
   
   
   
   
   Test Purpose {
   Test Purpose {
      TP Id "TP_MEC_MEX_ANY_001_NT"         //Negative case 401 Unauthorized - no token
      TP Id "TP_MEC_MEC009_MEX_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 
@@ -37,7 +27,7 @@ Package MEC_MEX_ANY_BI {
         when {
         when {
            the IUT entity receives a HTTP_REQUEST containing
            the IUT entity receives a HTTP_REQUEST containing
               uri indicating value ACCEPTABLE_URI,
               uri indicating value ACCEPTABLE_URI,
	       "not" authorization
	       not authorization
            ; from the MEC_CONSUMER entity
            ; from the MEC_CONSUMER entity
         }
         }
         then {
         then {
@@ -49,7 +39,7 @@ Package MEC_MEX_ANY_BI {
   }
   }
   
   
   Test Purpose {
   Test Purpose {
      TP Id "TP_MEC_MEX_ANY_001_WT"         //Negative case 401 Unauthorized - wrong token
      TP Id "TP_MEC_MEC009_MEX_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 
+385 −0
Original line number Original line Diff line number Diff line
/*
/*
Copyright (c) ETSI 2018.
Copyright (c) ETSI 2018-2021.

Released under BSD 3-clause license. For more information visit https://forge.etsi.org/legal-matters
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 {
Package MEC_MEC010p2_MEO_GRANT {
   
   
   import all from MEC_Common;
   import all from MEC_Common;
   
   
    Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_GRANT_001_OK"
      
      Test objective 
         "Check that MEO sends a synchronous grant response when a grant request is requested - INSTANTIATE"
      
      Reference
          "ETSI GS MEC 010-2 2.2.1, clause 7.5.1.3.1",
          "ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1",        //GrantRequest
          "ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 Note 2", //GrantRequest
          "ETSI GS MEC 010-2 2.2.1, 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,
            link indicating value H_LINK
         ;
      }

      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 INSTANTIATE,
                     addResources set to INST_RESOURCES_LIST,
                     _links set to H_LINK
               ;;;
            from the MEPM entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "201 Created",
               headers containing
                   Location indicating value "{GRANTING_ID}"
               body containing 
                  Grant containing
                     id set to any_value,
                     appInstanceId set to APP_INSTANCE_ID,
                     appLcmOpOccId set to any_value,
                     addResources set to INST_RESOURCES_LIST,
                     _links set to H_LINK
                  ;
               ;
            ;;
            to the MEPM entity
         }
      }
   }


   Test Purpose {
   Test Purpose {
      TP Id "TP_MEC_MEO_GRANT_001_OK"
      TP Id "TP_MEC_MEC010p2_MEO_GRANT_001_BR"
      
      
      Test objective 
      Test objective 
         "Check that MEO sends a synchronous grant response when a grant request is requested"
         "Check that MEO responds with an error when it receives a malformed request when a new grant request is performed - INSTANTIATE"
      
      
      Reference "ETSI GS MEC 010-2 2.1.1, clause 7.6.1.3.1",
      Reference
              "ETSI GS MEC 010-2 2.1.1, Table 6.2.4.2.2-1",      //GrantRequest
          "ETSI GS MEC 010-2 2.2.1, clause 7.5.1.3.1",
              "ETSI GS MEC 010-2 2.1.1, Table 6.2.4.4.2-1"       //Grant
          "ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1",        //GrantRequest
          "ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 Note 2", //GrantRequest
          "ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1"         //Grant
          
          
      Config Id Config_MEC_3
      Config Id Config_MEC_3
      
      PICS Selection PIC_GRANTS_MANAGEMENT
      PICS Selection PIC_GRANTS_MANAGEMENT


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


      Expected behaviour
      Expected behaviour
@@ -45,47 +96,148 @@ Package MEC010_2_MEO_GRANT_BV {
                     appInstanceId set to APP_INSTANCE_ID,
                     appInstanceId set to APP_INSTANCE_ID,
                     appLcmOpOccId set to any_value,
                     appLcmOpOccId set to any_value,
                     appDId set to any_value,
                     appDId set to any_value,
                     operation set to OPERATION_TYPE   //Shall be one from - INSTANTIATE - OPERATE - TERMINATE
                     operationERROR set to INSTANTIATE,
                     attribute _links
                     not addResources,
                     _links set to H_LINK
                  ;
                  ;
               ;
               ;
            ; 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_MEC010p2_MEO_GRANT_002_OK"
      
      Test objective 
         "Check that MEO sends a synchronous grant response when a grant request is requested"
      
      Reference
          "ETSI GS MEC 010-2 2.2.1, clause 7.5.1.3.1",
          "ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1",      //GrantRequest
          "ETSI GS MEC 010-2 2.2.1, 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,
            link indicating value H_LINK
            ;
            ;
      }

      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 - OPERATE - TERMINATE
                     _links set to H_LINK
                     ;;;
            from the MEPM entity
            from the MEPM entity
         }
         }
         then {
         then {
            the IUT entity sends a HTTP_RESPONSE containing
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "201 Created",
               status set to "201 Created",
               headers containing 
                  Location set to "/granting/v1/grants/{GRANTING_ID}"
               body containing 
               body containing 
                  Grant containing
                  Grant containing
                     id set to any_value,
                     id set to any_value,
                     appInstanceId set to APP_INSTANCE_ID,
                     appInstanceId set to APP_INSTANCE_ID,
                     appLcmOpOccId set to any_value,
                     appLcmOpOccId set to any_value,
                     attribute _links
                     _links set to H_LINK
                  ;
                  ;
               ;
               ;
            ; to the MEPM entity
            ;;
            to the MEPM entity
         }
         }
      }
      }
   }
   }


   
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_GRANT_003_OK"
      
      Test objective 
         "Check that MEO sends a asynchronous grant response when a grant request is requested - INSTANTIATE"
      
      Reference
          "ETSI GS MEC 010-2 2.2.1, clause 7.5.1.3.1",
          "ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1",        //GrantRequest
          "ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 Note 2", //GrantRequest
          "ETSI GS MEC 010-2 2.2.1, 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,
            link indicating value H_LINK
            ;
      }

      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 INSTANTIATE,
                     addResources set to INST_RESOURCES_LIST,
                     _links set to H_LINK
                  ;
               ;
            ;
            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 {
   Test Purpose {
      TP Id "TP_MEC_MEO_GRANT_002_OK"
      TP Id "TP_MEC_MEC010p2_MEO_GRANT_004_OK"
      
      
      Test objective 
      Test objective 
         "Check that MEO sends a asynchronous grant response when a grant request is requested"
         "Check that MEO sends a asynchronous grant response when a grant request is requested"
      
      
      Reference "ETSI GS MEC 010-2 2.1.1, clause 7.6.1.3.1",
      Reference
              "ETSI GS MEC 010-2 2.1.1, Table 6.2.4.2.2-1"      //GrantRequest
          "ETSI GS MEC 010-2 2.2.1, clause 7.6.1.3.1",
              
          "ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1",        //GrantRequest
          "ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1"         //Grant
          
          
      Config Id Config_MEC_3
      Config Id Config_MEC_3
      PICS Selection PIC_GRANTS_MANAGEMENT 
      PICS Selection PIC_GRANTS_MANAGEMENT 


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


      Expected behaviour
      Expected behaviour
@@ -98,8 +250,8 @@ Package MEC010_2_MEO_GRANT_BV {
                     appInstanceId set to APP_INSTANCE_ID,
                     appInstanceId set to APP_INSTANCE_ID,
                     appLcmOpOccId set to any_value,
                     appLcmOpOccId set to any_value,
                     appDId set to any_value,
                     appDId set to any_value,
                     operation set to OPERATION_TYPE   //Shall be one from - INSTANTIATE - OPERATE - TERMINATE
                     operation set to OPERATION_TYPE,   //Shall be one from - OPERATE - TERMINATE
                     attribute _links
                     _links set to H_LINK
                  ;
                  ;
               ;
               ;
            ;
            ;
@@ -116,16 +268,15 @@ Package MEC010_2_MEO_GRANT_BV {
      }
      }
   }
   }



   Test Purpose {
   Test Purpose {
      TP Id "TP_MEC_MEO_GRANT_003_OK"
      TP Id "TP_MEC_MEC010p2_MEO_GRANT_005_OK"
      
      
      Test objective 
      Test objective 
          "Check that MEO sends the status of a grant request when a query on a granting ID is performed"
          "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.1.1, clause 7.6.1.3.2"
      Reference 
              
          "ETSI GS MEC 010-2 2.2.1, clause 7.5.2.3.2",
              
          "ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1"
          
          
      Config Id Config_MEC_3
      Config Id Config_MEC_3
      PICS Selection PIC_GRANTS_MANAGEMENT 
      PICS Selection PIC_GRANTS_MANAGEMENT 
@@ -156,22 +307,22 @@ Package MEC010_2_MEO_GRANT_BV {




   Test Purpose {
   Test Purpose {
      TP Id "TP_MEC_MEO_GRANT_004_OK"
      TP Id "TP_MEC_MEC010p2_MEO_GRANT_006_OK"
      
      
      Test objective 
      Test objective 
         "Check that MEO sends the status of a grant request when a query on a granting ID is performed"
         "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.1.1, clause 7.6.1.3.2",
      Reference
                "ETSI GS MEC 010-2 2.1.1, Table 6.2.4.4.2-1"       //Grant
          "ETSI GS MEC 010-2 2.2.1, clause 7.5.2.3.2",
              
          "ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1"
              
          
          
      Config Id Config_MEC_3
      Config Id Config_MEC_3
      PICS Selection PIC_GRANTS_MANAGEMENT 
      PICS Selection PIC_GRANTS_MANAGEMENT 


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


      Expected behaviour
      Expected behaviour
@@ -190,9 +341,42 @@ Package MEC010_2_MEO_GRANT_BV {
                     id set to GRANTING_ID,
                     id set to GRANTING_ID,
                     appInstanceId set to any_value,
                     appInstanceId set to any_value,
                     appLcmOpOccId set to any_value,
                     appLcmOpOccId set to any_value,
                     attribute _links
                     _links set to H_LINK
                  ;
               ;   
               ;   
            ; to the MEPM entity
         }
      }
   }

   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_GRANT_006_NF"
      
      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.1.1, clause 7.5.2.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
            ; to the MEPM entity
         }
         }
      }
      }
+1289 −0

File added.

Preview size limit exceeded, changes collapsed.

+123 −0
Original line number Original line Diff line number Diff line
/*
Copyright (c) ETSI 2018-2021.
Released under BSD 3-clause license. For more information visit https://forge.etsi.org/legal-matters
*/
Package MEC_MEC010p2_APP_INSTANCE_LCM {
   
   import all from MEC_Common;
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEPM_LCM_01_OK"
      
      Test objective 
         "Check that MEC API provider has created the configuration information in AppD to the MEPM-V"
      
      Reference
          "ETSI GS MEC 010-2 2.2.1, clause 7.7.6.3.1",
          "ETSI GS MEC 010-2 2.2.1, Table 6.2.2.21.2-1" //ConfigPlatformForAppRequest
          
      Config Id Config_MEC_5
      PICS Selection PIC_APP_PACKAGE_MANAGEMENT 
      
      Expected behaviour
      ensure that {
          when {
              the IUT entity receives a vPOST containing 
                  uri indicating value "/app_lcm/v1/app_instances/{appInstanceId}/configure_platform_for_app",
                  body containing
                  ConfigPlatformForAppRequest containing
                     appServiceRequired set to some_values
                  ;
               ;
              ;
              from the MEO entity
         }
         then {
             the IUT entity sends a HTTP_RESPONSE containing
                 status set to "202 Accepted"
              ;
              to the MEO entity
         }
      }
   }
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEPM_LCM_01_BR"
      
      Test objective 
         "Check that MEC API provider sends an error when it receives a malformed request 
            for the configuration information in AppD to the MEPM-V"
      
      Reference
          "ETSI GS MEC 010-2 2.2.1, clause 7.7.6.3.1",
          "ETSI GS MEC 010-2 2.2.1, Table 6.2.2.21.2-1" //ConfigPlatformForAppRequest
          
      Config Id Config_MEC_5
      PICS Selection PIC_APP_PACKAGE_MANAGEMENT 
      
      Expected behaviour
      ensure that {
          when {
              the IUT entity receives a vPOST containing 
                  uri indicating value "/app_lcm/v1/app_instances/{appInstanceId}/configure_platform_for_app",
                  body containing
                  ConfigPlatformForAppRequest containing
                     appServiceWrongRequired set to some_values //Wrong Param
                  ;
               ;
              ;
              from the MEO entity
         }
         then {
             the IUT entity sends a HTTP_RESPONSE containing
                 status set to "400 Bad Request"
              ;
              to the MEO entity
         }
      }
   }
   
   
  Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEPM_LCM_01_NF"
      
      Test objective 
         "Check that MEC API provider sends an error when it receives a request 
            for the configuration information in AppD to the MEPM-V with not valid app instance ID"
      
      Reference
          "ETSI GS MEC 010-2 2.2.1, clause 7.7.6.3.1",
          "ETSI GS MEC 010-2 2.2.1, Table 6.2.2.21.2-1" //ConfigPlatformForAppRequest
          
      Config Id Config_MEC_5
      PICS Selection PIC_APP_PACKAGE_MANAGEMENT 
      
      Initial conditions  with {
          the IUT entity "not" having a AppInstanceInfo containing
              id indicating value NOT_EXISTING_APP_ID
          ;
      }
      
      Expected behaviour
      ensure that {
          when {
              the IUT entity receives a vPOST containing 
                  uri indicating value "/app_lcm/v1/app_instances/{NOT_EXISTING_APP_ID}/configure_platform_for_app",
                  body containing
                  ConfigPlatformForAppRequest containing
                     appServiceWrongRequired set to some_values //Wrong Param
                  ;
               ;
              ;
              from the MEO entity
         }
         then {
             the IUT entity sends a HTTP_RESPONSE containing
                 status set to "404 Not Found"
              ;
              to the MEO entity
         }
      }
   }
   
}
+1012 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading