Commit 10fbf0ef authored by Yann Garcia's avatar Yann Garcia
Browse files

Bug fixed after NXW review

parent b85387ab
Loading
Loading
Loading
Loading
+0 −134
Original line number 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_MEO_GRANT_BI {
   
   import all from MEC_Common;
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_GRANT_001_BR"
      
      Test objective 
         "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.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;
      }

      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 INSTANTIATE,
                     not addResources,
                     _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_MEC010p2_MEO_GRANT_001_BR"
      
      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.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
        ;
      }

      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
                     _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_MEC010p2_MEO_GRANT_003_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
         }
      }
   }
}
+108 −17
Original line number Diff line number Diff line
@@ -23,7 +23,9 @@ Package MEC_MEC010p2_MEO_GRANT_BV {

      Initial conditions  with {
         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
@@ -37,8 +39,9 @@ Package MEC_MEC010p2_MEO_GRANT_BV {
                     appLcmOpOccId set to any_value,
                     appDId set to any_value,
                     operation set to INSTANTIATE,
                     addResources set to INST_RESOURCES_LIST
                     _links;;;
                     addResources set to INST_RESOURCES_LIST,
                     _links set to H_LINK
               ;;;
            from the MEPM entity
         }
         then {
@@ -52,7 +55,7 @@ Package MEC_MEC010p2_MEO_GRANT_BV {
                     appInstanceId set to APP_INSTANCE_ID,
                     appLcmOpOccId set to any_value,
                     addResources set to INST_RESOURCES_LIST,
                     _links
                     _links set to H_LINK
                  ;
               ;
            ;;
@@ -61,6 +64,54 @@ Package MEC_MEC010p2_MEO_GRANT_BV {
      }
   }

   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_GRANT_001_BR"
      
      Test objective 
         "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.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,
                     operationERROR set to INSTANTIATE,
                     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"
      
@@ -77,7 +128,9 @@ Package MEC_MEC010p2_MEO_GRANT_BV {

      Initial conditions  with {
         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
@@ -91,7 +144,8 @@ Package MEC_MEC010p2_MEO_GRANT_BV {
                     appLcmOpOccId set to any_value,
                     appDId set to any_value,
                     operation set to OPERATION_TYPE,   //Shall be one from - OPERATE - TERMINATE
                     _links;;;
                     _links set to H_LINK
                     ;;;
            from the MEPM entity
         }
         then {
@@ -104,7 +158,7 @@ Package MEC_MEC010p2_MEO_GRANT_BV {
                     id set to any_value,
                     appInstanceId set to APP_INSTANCE_ID,
                     appLcmOpOccId set to any_value,
                     _links
                     _links set to H_LINK
                  ;
               ;
            ;;
@@ -115,10 +169,10 @@ Package MEC_MEC010p2_MEO_GRANT_BV {

   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_GRANT_003_OK - INSTANTIATE"
      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"
         "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",
@@ -131,7 +185,9 @@ Package MEC_MEC010p2_MEO_GRANT_BV {

      Initial conditions  with {
         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
@@ -146,7 +202,7 @@ Package MEC_MEC010p2_MEO_GRANT_BV {
                     appDId set to any_value,
                     operation set to INSTANTIATE,
                     addResources set to INST_RESOURCES_LIST,
                     _links
                     _links set to H_LINK
                  ;
               ;
            ;
@@ -179,7 +235,8 @@ Package MEC_MEC010p2_MEO_GRANT_BV {

      Initial conditions  with {
         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
         ;
      }

@@ -194,7 +251,7 @@ Package MEC_MEC010p2_MEO_GRANT_BV {
                     appLcmOpOccId set to any_value,
                     appDId set to any_value,
                     operation set to OPERATION_TYPE,   //Shall be one from - OPERATE - TERMINATE
                     _links
                     _links set to H_LINK
                  ;
               ;
            ;
@@ -264,7 +321,8 @@ Package MEC_MEC010p2_MEO_GRANT_BV {

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

      Expected behaviour
@@ -283,7 +341,7 @@ Package MEC_MEC010p2_MEO_GRANT_BV {
                     id set to GRANTING_ID,
                     appInstanceId set to any_value,
                     appLcmOpOccId set to any_value,
                     _links
                     _links set to H_LINK
                  ;
               ;   
            ; to the MEPM entity
@@ -291,4 +349,37 @@ Package MEC_MEC010p2_MEO_GRANT_BV {
      }
   }

   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
         }
      }
   }
   
}
+1 −1
Original line number Diff line number Diff line
@@ -629,7 +629,7 @@ Package MEC_MEC010p2_MEO_PKGM_BV {
      ensure that {
          when {
              the IUT entity receives a vGET containing 
                  uri indicating value "/app_pkgm/v1/app_packages/{APP_PKG_ID}/package_content",
                  uri indicating value "/app_pkgm/v1/app_packages/{APP_PKG_ID}/appd",
                  accept set to "application/zip"
              ;
              from the MEC_OSS entity