Commit 7e44c22e authored by Yann Garcia's avatar Yann Garcia
Browse files

Full review of MEO/PKGM; Remove file AppPkgMgt_BO-BI.tplan2

parent 10fbf0ef
Loading
Loading
Loading
Loading
+0 −490
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_PKGM_BO_BI {
   
   import all from MEC_Common;
   
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_PKGM_001_BR"
      
      Test objective 
         "Check that MEO responds with an error when it receives 
         a malformed request for creating a new App Package"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.3.1.3.1",
                "ETSI GS MEC 010-2 2.2.1, Table 6.2.3.2.2-1"
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE_MANAGEMENT

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing 
               uri indicating value "/app_pkgm/v1/app_packages",
               body containing
                  AppPkg containing
                     not appPkgName
                  ;
               ;
            ; from the MEC_OSS entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "400 Bad Request"
            ; to the MEC_OSS entity
         }
      }
   }

   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_PKGM_002_BR"
      
      Test objective 
         "Check that MEO responds with an error when it receives 
         a malformed request for retrieving the list of existing App Packages"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.3.1.3.2",
              "ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1"
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE_MANAGEMENT

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing 
               uri indicating value "/app_pkgm/v1/app_packages",
               query_parameters containing 
                  operationalStatus indicating value any_value      // the query parameter should be operationalState not operationalStatus
               ;
            ; from the MEC_OSS entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "400 Bad Request"
            ; to the MEC_OSS entity
         }
      }       
   }
    
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_PKGM_003_NF"
      
      Test objective 
         "Check that MEO responds with an error when it receives 
         a request for retrieving a App Package referred with a wrong ID"
      
       Reference "ETSI GS MEC 010-2 2.2.1, clause 7.3.2.3.2",
              "ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1"
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE_MANAGEMENT

      Initial conditions  with {
         the IUT entity not having a App_Package containing
            appPkgId indicating value NON_EXISTENT_APP_PKG_ID
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/app_pkgm/v1/app_packages/{NON_EXISTENT_APP_PKG_ID}"
            ; from the MEC_OSS entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_OSS entity
         }
      }
   }
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_PKGM_004_NF"
      
      Test objective 
         "Check that MEO responds with an error when it receives 
         a request for deleting an App Package referred with a wrong ID"
      
       Reference "ETSI GS MEC 010-2 2.2.1, clause 7.3.2.3.4",
              "ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1"
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE_MANAGEMENT

      Initial conditions  with {
         the IUT entity not having a App_Package containing
            appPkgId indicating value NON_EXISTENT_APP_PKG_ID
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vDELETE containing
               uri indicating value "/app_pkgm/v1/app_packages/{NON_EXISTENT_APP_PKG_ID}"
            ; from the MEC_OSS entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_OSS entity
         }
      }       
   }
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_PKGM_005_BR"
      
      Test objective 
         "Check that MEO sends an error when it receives a malformed request to modify
          the operational state of an application package"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.3.2.3.5"
                
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE_MANAGEMENT 

      Initial conditions  with {
         the IUT entity having a App_Package containing
            appPkgId indicating value ON_BOARDED_APP_PKG_ID
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPATCH containing 
               uri indicating value "/app_pkgm/v1/app_packages/{ON_BOARDED_APP_PKG_ID}",
               body containing
                   appPkgInfoModifications containing
                       appPkgOperation indicating value "DISABL" //it should be DISABLE
                   ;
               ;
            ;
            from the MEC_OSS entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "400 Bad Request";
            to the MEC_OSS entity
         }
      }
   }
   

   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_PKGM_005_NF"
      
      Test objective 
         "Check that MEO responds with an error when it receives 
         a request for updating an App Package referred with a wrong ID"
      
       Reference "ETSI GS MEC 010-2 2.2.1, clause 7.3.2.3.5",
              "ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1"
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE_MANAGEMENT

      Initial conditions  with {
         the IUT entity not having a App_Package containing
            appPkgId indicating value NON_EXISTENT_APP_PKG_ID
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPATCH containing
               uri indicating value "/app_pkgm/v1/app_packages/{NON_EXISTENT_APP_PKG_ID}",
                 body containing
                   appPkgInfoModifications containing
                       appPkgOperation indicating value "DISABL"
                   ;
               ;
            ;
            from the MEC_OSS entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_OSS entity
         }
      }       
   }

   Test Purpose {
       TP Id "TP_MEC_MEC010p2_MEO_PKGM_006_BR"
      
       Test objective 
           "Check that MEO service sends an error when it receives a 
            malformed request for creating a new subscription on AppPackages"
      
       Reference
          "ETSI GS MEC 010-2 2.2.1, clause 7.3.4.3.1",
          "ETSI GS MEC 010-2 2.2.1, clause 6.2.3.4",
          "ETSI GS MEC 010-2 2.2.1, clause 6.2.3.7"
          
       Config Id Config_MEC_2
       PICS Selection PIC_APP_PACKAGE_MANAGEMENT 

       Initial conditions  with {
           the IUT entity being_in idle_state
       }

       Expected behaviour
       ensure that {
           when {
               the IUT entity receives a POST containing 
                   uri indicating value "/app_pkgm/v1/subscriptions",
                   body containing
                       AppPkgSubscription containing
                           subscriptionType set to "ON-BOARDING"  // Enum should be "ONBOARDING"
                       ;
                   ;
               ;
               from the MEC_OSS entity
           }
           then {
               the IUT entity sends a HTTP_RESPONSE containing
                   status set to "400 Bad Request"
               ;
               to the MEC_OSS entity
          }
      }
   }
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_PKGM_008_NF"
      
      Test objective 
         "Check that MEO service sends an error when it receives a query for a subscription on AppPackages 
          with a wrong identifier"
          
      Reference
          "ETSI GS MEC 010-2 2.2.1, clause 7.3.4.3.2",
          "ETSI GS MEC 010-2 2.2.1, clause 6.2.3.4",
          "ETSI GS MEC 010-2 2.2.1, clause 6.2.3.7"
          
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE_MANAGEMENT 

      Initial conditions  with {
         the IUT entity not having a Subscription containing
            subscriptionId indicating value NON_EXISTENT_SUBSCRIPTION_ID
         ;

      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing 
               uri indicating value "/app_pkgm/v1/subscriptions/{NON_EXISTENT_SUBSCRIPTION_ID}"
            ;
            from the MEC_OSS entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ;         
            to the MEC_OSS entity
         }
      }
   }  
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_PKGM_009_NF"
      
      Test objective 
         "Check that MEO service sends an error when it receives a deletion request for a subscription on AppPackages 
          with a wrong identifier"
          
      Reference
          "ETSI GS MEC 010-2 2.2.1, clause 7.3.4.3.4",
          "ETSI GS MEC 010-2 2.2.1, clause 6.2.3.4",
          "ETSI GS MEC 010-2 2.2.1, clause 6.2.3.7"
          
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE_MANAGEMENT 

      Initial conditions  with {
         the IUT entity not having a Subscription containing
            subscriptionId indicating value NON_EXISTENT_SUBSCRIPTION_ID
         ;

      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vDELETE containing 
               uri indicating value "/app_pkgm/v1/subscriptions/{NON_EXISTENT_SUBSCRIPTION_ID}"
            ;
            from the MEC_OSS entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ;         
            to the MEC_OSS entity
         }
      }
   }
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_PKGM_011_NF"         //Negative case 404 Not found
      
      Test objective 
         "Check that MEO responds with an error when it receives 
         a request to retrieve an application descriptor referred with a wrong app package ID"
      
       Reference "ETSI GS MEC 010-2 2.2.1, clause 7.3.6.3.2",
              "ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1"      //OnboardedAppPkgInfo
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE_MANAGEMENT

      Initial conditions  with {
         the IUT entity not having a App_Package containing
            appPkgId indicating value NON_EXISTENT_APP_PKG_ID
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPUT containing
               uri indicating value "/app_pkgm/v1/app_packages/{NON_EXISTENT_APP_PKG_ID}/appDId"
            ; from the MEC_OSS entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_OSS entity
         }
      }       
   }
 
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_PKGM_012_BR"
      
      Test objective 
         "Check that MEO service sends an error when it receives a 
          malformed request for creating a new subscription on AppPackages"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.3.3.3.1"
                
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE_MANAGEMENT 

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a POST containing 
               uri indicating value "/app_pkgm/v1/subscriptions",
               body containing
                  AppPkgSubscription containing
                     callbackUri set to URI,
                     subscriptionType set to "ON-BOARDING"  // Enum should be "ONBOARDING"
                  ;
               ;
            ;
            from the MEC_OSS entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "400 Bad Request"
            ;         
            to the MEC_OSS entity
         }
      }
   }

   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_PKGM_012_01_NF"
      
      Test objective 
          "Check that MEO fetches the on-boarded application package content identified by appPkgId when requested"
      
      Reference
          "ETSI GS MEC 010-2 2.2.1, clause 7.3.7.3.2"
          
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE_MANAGEMENT 

      Initial conditions  with {
          the IUT entity having a App_Package containing
              appPkgId indicating value APP_PKG_ID,
              appDId indicating value ON_BOARDED_APPD_ID
          ;
      }

      Expected behaviour
      ensure that {
          when {
              the IUT entity receives a vGET containing 
                  uri indicating value "/app_pkgm/v1/app_packages/{NON_EXISTING_APP_PKG_ID}/package_content",
                  accept set to "application/zip"
              ;
              from the MEC_OSS entity
          }
          then {
              the IUT entity sends a HTTP_RESPONSE containing
                  status set to "404 Not Found"
               ;
               to the MEC_OSS entity
         }
      }
   }
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEO_PKGM_012_02_NF"
      
      Test objective 
          "Check that MEO fetches the on-boarded application package content identified by appDId when requested"
      
      Reference
          "ETSI GS MEC 010-2 2.2.1, clause 7.3.7.3.2"
          
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE_MANAGEMENT 

      Initial conditions  with {
          the IUT entity having a App_Package containing
              appPkgId indicating value APP_PKG_ID,
              appDId indicating value ON_BOARDED_APPD_ID
          ;
      }

      Expected behaviour
      ensure that {
          when {
              the IUT entity receives a vGET containing 
                  uri indicating value "/app_pkgm/v1/onboarded_app_packages/{NON_EXISTING_ON_BOARDED_APPD_ID}/package_content",
                  accept set to "application/zip"
              ;
              from the MEC_OSS entity
          }
          then {
              the IUT entity sends a HTTP_RESPONSE containing
                  status set to "404 Not Found"
               ;
               to the MEC_OSS entity
         }
      }
   }
   
}
+464 −26

File changed.

Preview size limit exceeded, changes collapsed.