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

Merge branch 'fix_folders' into 'master'

Remove old folders.

See merge request mec/MEC-tests!12
parents 94219e21 44ba95b8
Loading
Loading
Loading
Loading
+0 −1076

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −451
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 plat_dns_rules {

   import all from MEC_Common;


   /*
    * DNS rules (DNS)
    */
   Test Purpose {
      TP Id "TP_MEC_PLAT_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_PLAT_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_PLAT_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_PLAT_DNS_001_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 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 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 GET 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 "403 Forbidden"
               ;
               to the MEC_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_PLAT_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_PLAT_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_PLAT_DNS_004_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 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 PUT 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,
                     state indicating value STATE_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 "403 Forbidden"
               ;
               to the MEC_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_PLAT_DNS_005_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_PLAT_DNS_006_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
            }
         }
   }
}
+0 −557

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −557

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −72
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 plat_radio_node_location_lookup {

   import all from MEC_Common;


   /*
    * Radio Node Location Lookup (RLOC)
    */

   Test Purpose {
      TP Id "TP_MEC_PLAT_RLOC_001_OK"

      Test objective
         "Check that the IUT responds with the list of radio nodes currently associated with the MEC host and the location of each radio node
         when queried by a MEC Application"

      Reference "ETSI GS MEC 013 V1.5.0, clause 7.3.7",
         "https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/AccessPointList"

      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 ue_location containing 
            zoneId indicating value ZONE_ID
         ;
      }

      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  uri indicating value "location/v2/zones/{ZONE_ID}/accessPoints",
                  query_parameters containing
                     zoneId indicating value ZONE_ID
                  ;
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 013, clause 7.3.7
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "200 OK"
                  body containing
                     accessPointList containing
                        zoneId set to ZONE_ID
                     ;
                  ;
               ;
               to the MEC_APP entity
            }
         }
   }

}
Loading