Commit e80cc0fd authored by Filipe Ferreira's avatar Filipe Ferreira
Browse files

Prepare merge to master.

parent 01336fcc
Loading
Loading
Loading
Loading
+341 −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 MEC_MEO_UEAPPCTX {

   import all from MEC_Common;


   /*
    * UE Application Contexts (UEAPPCTX)
    */

   Test Purpose {
      TP Id "TP_MEC_MEO_UEAPPCTX_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_MEO_UEAPPCTX_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_MEO_UEAPPCTX_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_MEO_UEAPPCTX_002_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_MEO_UEAPPCTX_002_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_MEO_UEAPPCTX_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_MEO_UEAPPCTX_003_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
            }
         }
   }
}
+804 −0

File added.

Preview size limit exceeded, changes collapsed.

+360 −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 MEC_SRV_DNS {

   import all from MEC_Common;


   /*
    * DNS rules (DNS)
    */
   Test Purpose {
      TP Id "TP_MEC_SRV_DNS_001_OK"

      Test objective
         "Check that the IUT responds with a list of active DNS rules
         when queried by a MEC Application"

      Reference "ETSI GS MEC 011 V2.0.9, clause 7.12.3.1",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.yaml#/definitions/DnsRule"

      Config Id Config_MEC_1

      PICS Selection PIC_MEC_PLAT and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ;
      }

      // MEC 011, clause 5.2.8
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  uri indicating value "mec_app_support/v1/applications/{APP_INSTANCE_ID}/dns_rules"
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.12.3.1
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "200 OK"
                  body containing
                     DnsRuleList containing
                        DnsRule set to any_value
                     ;
                  ;
               ;
               to the MEC_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SRV_DNS_002_OK"

      Test objective
         "Check that the IUT responds with the information on a specific DNS rule
         when queried by a MEC Application"

      Reference "ETSI GS MEC 011 V2.0.9, clause 7.13.3.1",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.yaml#/definitions/DnsRule"

      Config Id Config_MEC_1

      PICS Selection PIC_MEC_PLAT and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ; and
         the IUT entity having a dns_rules containing
            rule_id indicating value DNS_RULE_ID
         ;
      }

      // MEC 011, clause 5.2.8
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  uri indicating value "mec_app_support/v1/applications/{APP_INSTANCE_ID}/dns_rules/{DNS_RULE_ID}" 
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.13.3.1
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "200 OK"
                  body containing
                     DnsRule containing  
                        dnsRuleId set to DNS_RULE_ID
                     ;
                  ;
               ;
               to the MEC_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SRV_DNS_002_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 011 V2.0.9, clause 7.13.3.1"

      Config Id Config_MEC_1

      PICS Selection PIC_MEC_PLAT and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ; and
         the IUT entity "not" having a dns_rules containing
            rule_id indicating value NON_EXISTENT_DNS_RULE_ID
         ;
      }

      // MEC 011, clause 5.2.8
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  uri indicating value "mec_app_support/v1/applications/{APP_INSTANCE_ID}/dns_rules/{NON_EXISTENT_DNS_RULE_ID}" 
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.13.3.1
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "404 Not Found"
               ;
               to the MEC_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SRV_DNS_003_OK"

      Test objective
         "Check that the IUT updates a specific DNS rule
         when commanded by a MEC Application"

      Reference "ETSI GS MEC 011 V2.0.9, clause 7.13.3.2",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.yaml#/definitions/DnsRule"

      Config Id Config_MEC_1

      PICS Selection PIC_MEC_PLAT and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ; and
         the IUT entity having a dns_rules containing
            rule_id indicating value DNS_RULE_ID
         ;
      }

      // MEC 011, clause 5.2.8
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  uri indicating value "mec_app_support/v1/applications/{APP_INSTANCE_ID}/dns_rules/{DNS_RULE_ID}",
                  if_match indicating value PROPER_ETAG
                  body containing
                     dnsRuleId indicating value DNS_RULE_NAME,
                     ipAddress indicating value SOME_IP_ADDRESS
                  ;
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.13.3.2
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "200 OK"
                  body containing
                     DnsRule containing
                        dnsRuleId set to DNS_RULE_NAME,
                        ipAddress set to SOME_IP_ADDRESS
                     ;
                  ;
               ;
               to the MEC_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SRV_DNS_003_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 011 V2.0.9, clause 7.13.3.2"

      Config Id Config_MEC_1

      PICS Selection PIC_MEC_PLAT and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ; and
         the IUT entity having a dns_rules containing
            rule_id indicating value DNS_RULE_ID
         ;
      }

      // MEC 011, clause 5.2.8
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  uri indicating value "mec_app_support/v1/applications/{APP_INSTANCE_ID}/dns_rules/{DNS_RULE_ID}",
                  if_match indicating value PROPER_ETAG
                  body containing
                     dnsRuleId indicating value DNS_RULE_NAME,
                     // Unknown parameter value should trigger an error response.
                     state indicating value UNKNOWN_VALUE
                  ;
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.13.3.2
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "400 Bad Request"
               ;
               to the MEC_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SRV_DNS_003_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 011 V2.0.9, clause 7.13.3.2"

      Config Id Config_MEC_1

      PICS Selection PIC_MEC_PLAT and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ; and
         the IUT entity "not" having a dns_rules containing
            rule_id indicating value NON_EXISTENT_DNS_RULE_ID
         ;
      }

      // MEC 011, clause 5.2.8
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  uri indicating value "mec_app_support/v1/applications/{APP_INSTANCE_ID}/dns_rules/{NON_EXISTENT_DNS_RULE_ID}",
                  if_match indicating value PROPER_ETAG 
                  body containing
                     dnsRuleId indicating value DNS_RULE_NAME,
                     ipAddress indicating value SOME_IP_ADDRESS
                  ;
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.13.3.2
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "404 Not Found"
               ;
               to the MEC_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SRV_DNS_003_PF"

      Test objective
         "Check that the IUT responds with an error when
         a request sent by a MEC Application doesn't comply with a required condition"

      Reference "ETSI GS MEC 011 V2.0.9, clause 7.13.3.2"

      Config Id Config_MEC_1

      PICS Selection PIC_MEC_PLAT and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ; and
         the IUT entity having a dns_rules containing
            rule_id indicating value DNS_RULE_ID
         ;
      }

      // MEC 011, clause 5.2.8
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  uri indicating value "mec_app_support/v1/applications/{APP_INSTANCE_ID}/dns_rules/{DNS_RULE_ID}",
                  if_match indicating value INVALID_ETAG
                  body containing
                     dnsRuleId indicating value DNS_RULE_NAME,
                     ipAddress indicating value SOME_IP_ADDRESS
                  ;
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.13.3.2
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "412 Precondition Failed"
               ;
               to the MEC_APP entity
            }
         }
   }
}
+387 −0

File added.

Preview size limit exceeded, changes collapsed.

+387 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading