Commit f36265ce authored by Michele Carignani's avatar Michele Carignani
Browse files

Merge branch 'remove-401s'

parents be5112d9 291868fb
Loading
Loading
Loading
Loading
+0 −603
Original line number 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 sys_mx2_ue_apps_context {

   import all from MEC_Common;


   /*
    * UE Application Contexts (APPCTX)
    */

   Test Purpose {
      TP Id "TP_MEC_SYS_APPCTX_001_OK"

      Test objective
         "Check that the IUT acknowledges the creation of the application context
         when requested by an UE Application"

      Reference "ETSI GS MEC 016 V2.1.1, clause 7.4.3.4",
         "https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      // MEC 016, clause 5.1.3
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPOST containing
                  uri indicating value "mx2/v2/app_contexts",
                  body containing
                     AppContext containing
                        appInfo containing
                           appName set to APP_NAME
                        ;
                     ;
                  ;
               ;
               from the UE_APP entity
            }
            then {
               // MEC 016, clause 7.4.3.4
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "201 Created",
                  Location set to LOCATION,
                  body containing
                     AppContext containing
                        appInfo containing
                           appName set to APP_NAME
                        ;
                     ;
                  ;
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SYS_APPCTX_002_OK"

      Test objective
         "Check that the IUT updates the application callback reference
         when commanded by an UE Application"

      Reference "ETSI GS MEC 016 V2.1.1, clause 7.5.3.2",
         "https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity having a appContext containing
            contextId indicating value CONTEXT_ID
         ;
      }

      // MEC 016, clause 5.1.5
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  uri indicating value "mx2/v2/app_contexts/{CONTEXT_ID}"
                  body containing
                     AppContext containing
                        callbackReference indicating value some_uri
                     ;
                  ;
               ;
               from the UE_APP entity
            }
            then {
               // MEC 017, clause 7.5.3.2
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "204 No Content"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SYS_APPCTX_003_OK"

      Test objective
         "Check that the IUT deletes the application context
         when commanded by an UE Application"

      Reference "ETSI GS MEC 016 V2.1.1, clause 7.5.3.5"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity having a appContext containing
            contextId indicating value CONTEXT_ID
         ;
      }

      // MEC 016, clause 5.1.4
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vDELETE containing
                  uri indicating value "mx2/v2/app_contexts/{CONTEXT_ID}"
               ;
               from the UE_APP entity
            }
            then {
               // MEC 016, clause 7.5.3.5
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "204 No Content"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SYS_APPCTX_001_BR"

      Test objective
         "Check that the IUT responds with an error when
         a request with incorrect parameters is sent by a MEC Application"

      Reference "ETSI GS MEC 016 V2.1.1, clause 7.4.3.4",
         "https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      // MEC 016, clause 5.1.3
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPOST containing
                  uri indicating value "mx2/v2/app_contexts",
                  body containing
                     AppContext containing
                        appInfo containing
                           // Wrong parameter name should trigger an error response.
                           app set to APP_NAME
                        ;
                     ;
                  ;
               ;
               from the UE_APP entity
            }
            then {
               // MEC 016, clause 7.4.3.4
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "400 Bad Request"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SYS_APPCTX_002_BI"

      Test objective
         "Check that the IUT responds with an error when
         a non-authenticated request is sent by a MEC Application"

      Reference "ETSI GS MEC 016 V2.1.1, clause 7.4.3.4",
         "https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      // MEC 016, clause 5.1.3
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a iPOST containing
                  uri indicating value "mx2/v2/app_contexts",
                  body containing
                     AppContext containing
                        appInfo containing
                           appName set to APP_NAME
                        ;
                     ;
                  ;
               ;
               from the UE_APP entity
            }
            then {
               // MEC 016, clause 7.4.3.4
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "401 Unauthorized"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SYS_APPCTX_003_BI"

      Test objective
         "Check that the IUT responds with an error when
         an unauthorised request is sent by a MEC Application"

      Reference "ETSI GS MEC 016 V2.1.1, clause 7.4.3.4",
         "https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      // MEC 016, clause 5.1.3
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a POST containing
                  uri indicating value "mx2/v2/app_contexts",
                  body containing
                     AppContext containing
                        appInfo containing
                           appName set to APP_NAME
                        ;
                     ;
                  ;
               ;
               from the UE_APP entity
            }
            then {
               // MEC 016, clause 7.4.3.4
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "403 Forbidden"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SYS_APPCTX_004_BR"

      Test objective
         "Check that the IUT responds with an error when
         a request with incorrect parameters is sent by a MEC Application"

      Reference "ETSI GS MEC 016 V2.1.1, clause 7.5.3.2",
         "https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity having a appContext containing
            contextId indicating value CONTEXT_ID
         ;
      }

      // MEC 016, clause 5.1.5
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  uri indicating value "mx2/v2/app_contexts/{CONTEXT_ID}"
                  body containing
                     AppContext containing
                        // A parameter not legible for update should trigger an error response.
                        associateUeAppId indicating value some_value
                     ;
                  ;
               ;
               from the UE_APP entity
            }
            then {
               // MEC 017, clause 7.5.3.2
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "400 Bad Request"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SYS_APPCTX_005_BI"

      Test objective
         "Check that the IUT responds with an error when
         a non-authenticated request is sent by a MEC Application"

      Reference "ETSI GS MEC 016 V2.1.1, clause 7.5.3.2",
         "https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity having a appContext containing
            contextId indicating value CONTEXT_ID
         ;
      }

      // MEC 016, clause 5.1.5
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a iPUT containing
                  uri indicating value "mx2/v2/app_contexts/{CONTEXT_ID}",
                  body containing
                     AppContext containing
                        callbackReference indicating value some_uri
                     ;
                  ;
               ;
               from the UE_APP entity
            }
            then {
               // MEC 017, clause 7.5.3.2
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "401 Unauthorized"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SYS_APPCTX_006_BI"

      Test objective
         "Check that the IUT responds with an error when
         a non-authorised request is sent by a MEC Application"

      Reference "ETSI GS MEC 016 V2.1.1, clause 7.5.3.2",
         "https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity having a appContext containing
            contextId indicating value CONTEXT_ID
         ;
      }

      // MEC 016, clause 5.1.5
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a PUT containing
                  uri indicating value "mx2/v2/app_contexts/{CONTEXT_ID}"
                  body containing
                     AppContext containing
                        callbackReference indicating value some_uri
                     ;
                  ;
               ;
               from the UE_APP entity
            }
            then {
               // MEC 017, clause 7.5.3.2
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "403 Forbidden"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SYS_APPCTX_007_NF"

      Test objective
         "Check that the IUT responds with an error when
         a request for an unknown URI is sent by a MEC Application"

      Reference "ETSI GS MEC 016 V2.1.1, clause 7.5.3.2",
         "https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity "not" having a appContext containing
            contextId indicating value NON_EXISTENT_CONTEXT_ID
         ;
      }

      // MEC 016, clause 5.1.5
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  uri indicating value "mx2/v2/app_contexts/{NON_EXISTENT_CONTEXT_ID}",
                  body containing
                     AppContext containing
                        callbackReference indicating value some_uri
                     ;
                  ;
               ;
               from the UE_APP entity
            }
            then {
               // MEC 017, clause 7.5.3.2
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "404 Not Found"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SYS_APPCTX_008_BI"

      Test objective
         "Check that the IUT responds with an error when
         a non-authenticated request is sent by a MEC Application"

      Reference "ETSI GS MEC 016 V2.1.1, clause 7.5.3.5"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity having a appContext containing
            contextId indicating value CONTEXT_ID
         ;
      }

      // MEC 016, clause 5.1.4
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a iDELETE containing
                  uri indicating value "mx2/v2/app_contexts/{CONTEXT_ID}"
               ;
               from the UE_APP entity
            }
            then {
               // MEC 016, clause 7.5.3.5
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "401 Unauthorized"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SYS_APPCTX_009_BI"

      Test objective
         "Check that the IUT responds with an error when
         an unauthorised request is sent by a MEC Application"

      Reference "ETSI GS MEC 016 V2.1.1, clause 7.5.3.5"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity having a appContext containing
            contextId indicating value CONTEXT_ID
         ;
      }

      // MEC 016, clause 5.1.4
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a DELETE containing
                  uri indicating value "mx2/v2/app_contexts/{CONTEXT_ID}"
               ;
               from the UE_APP entity
            }
            then {
               // MEC 016, clause 7.5.3.5
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "403 Forbidden"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SYS_APPCTX_010_NF"

      Test objective
         "Check that the IUT responds with an error when
         a request for an unknown URI is sent by a MEC Application"

      Reference "ETSI GS MEC 016 V2.1.1, clause 7.5.3.5"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity "not" having a appContext containing
            contextId indicating value NON_EXISTENT_CONTEXT_ID
         ;
      }

      // MEC 016, clause 5.1.4
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vDELETE containing
                  uri indicating value "mx2/v2/app_contexts/{NON_EXISTENT_CONTEXT_ID}"
               ;
               from the UE_APP entity
            }
            then {
               // MEC 016, clause 7.5.3.5
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "404 Not Found"
               ;
               to the UE_APP entity
            }
         }
   }
}
+3 −11
Original line number Diff line number Diff line
@@ -87,7 +87,6 @@ Package MEC010_2_MEO_PKGM_BO_BI {
      }       
   }
    

   Test Purpose {
      TP Id "TP_MEC_MEO_PKGM_003_NF"         //Negative case 404 Not found
      
@@ -121,7 +120,6 @@ Package MEC010_2_MEO_PKGM_BO_BI {
      }       
   }
   
   
   Test Purpose {
      TP Id "TP_MEC_MEO_PKGM_004_NF"         //Negative case 404 Not found
      
@@ -257,8 +255,6 @@ Package MEC010_2_MEO_PKGM_BO_BI {
      }       
   }
 


   Test Purpose {
      TP Id "TP_MEC_MEO_PKGM_007_BR"
      
@@ -298,8 +294,6 @@ Package MEC010_2_MEO_PKGM_BO_BI {
      }
   }



   Test Purpose {
      TP Id "TP_MEC_MEO_PKGM_009_NF"
      
@@ -336,8 +330,6 @@ Package MEC010_2_MEO_PKGM_BO_BI {
      }
   }



   Test Purpose {
      TP Id "TP_MEC_MEO_PKGM_010_NF"
      
+0 −591

File changed.

Preview size limit exceeded, changes collapsed.

+147 −1133

File changed.

Preview size limit exceeded, changes collapsed.

+0 −491

File changed.

Preview size limit exceeded, changes collapsed.

Loading