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

Merge branch 'ubi' into 'master'

Ubiwhere contributions

See merge request mec/MEC-tests!3
parents ca2ae652 95b7f643
Loading
Loading
Loading
Loading
+773 −0

File added.

Preview size limit exceeded, changes collapsed.

+763 −16

File changed.

Preview size limit exceeded, changes collapsed.

+214 −40
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ 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_mp1_dns_rules {
Package plat_dns_rules {

   import all from MEC_Common;

@@ -22,7 +22,7 @@ Package plat_mp1_dns_rules {
    * DNS rules (DNS)
    */
   Test Purpose {
      TP Id "TP_MEC_PLAT_MP1_DNS_BV_001"
      TP Id "TP_MEC_PLAT_DNS_001_OK"

      Test objective
         "Check that the IUT responds with a list of active DNS rules
@@ -47,13 +47,13 @@ Package plat_mp1_dns_rules {
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  Uri indicating value "mp1/v1/applications/{APP_INSTANCE_ID}/dns_rules"
                  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 HttpMsg containing
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "200 OK"
                  body containing
                     DnsRuleList containing
@@ -68,7 +68,7 @@ Package plat_mp1_dns_rules {


   Test Purpose {
      TP Id "TP_MEC_PLAT_MP1_DNS_BV_002"
      TP Id "TP_MEC_PLAT_DNS_002_OK"

      Test objective
         "Check that the IUT responds with the information on a specific DNS rule
@@ -96,22 +96,20 @@ Package plat_mp1_dns_rules {
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  Uri indicating value "mp1/v1/applications/{APP_INSTANCE_ID}/dns_rules/{DNS_RULE_ID}" 
                  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 HttpMsg containing
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "200 OK"
                  body containing
                     DnsRuleList containing 
                     DnsRule containing  
                        dnsRuleId set to DNS_RULE_ID
                     ;
                  ;
               ;
               ;
               to the MEC_APP entity
            }
         }
@@ -119,7 +117,7 @@ Package plat_mp1_dns_rules {


   Test Purpose {
      TP Id "TP_MEC_PLAT_MP1_DNS_BV_003"
      TP Id "TP_MEC_PLAT_DNS_003_OK"

      Test objective
         "Check that the IUT updates a specific DNS rule
@@ -147,7 +145,8 @@ Package plat_mp1_dns_rules {
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  Uri indicating value "mp1/v1/applications/{APP_INSTANCE_ID}/dns_rules/{DNS_RULE_ID}" 
                  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
@@ -157,7 +156,7 @@ Package plat_mp1_dns_rules {
            }
            then {
               // MEC 011, clause 7.13.3.2
               the IUT entity sends a HttpMsg containing
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "200 OK"
                  body containing
                     DnsRule containing
@@ -173,15 +172,99 @@ Package plat_mp1_dns_rules {


   Test Purpose {
      TP Id "TP_MEC_PLAT_MP1_DNS_BI_001"
      TP Id "TP_MEC_PLAT_DNS_001_BI"

      Test objective
         "Check that the IUT responds with an error when
         non compliant data is sent for an update to a specific DNS rule
         by a MEC Application"
         an unauthorised request is sent by a MEC Application"

      Reference "ETSI GS MEC 011 V2.0.4, clause 7.13.3.2",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.yaml#/definitions/ProblemDetails"
      Reference "ETSI GS MEC 011 V2.0.4, 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.4, 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.4, clause 7.13.3.2"

      Config Id Config_MEC_1

@@ -202,9 +285,11 @@ Package plat_mp1_dns_rules {
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  Uri indicating value "mp1/v1/applications/{APP_INSTANCE_ID}/dns_rules/{DNS_RULE_ID}" 
                  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
                  ;
               ;
@@ -212,13 +297,56 @@ Package plat_mp1_dns_rules {
            }
            then {
               // MEC 011, clause 7.13.3.2
               the IUT entity sends a HttpMsg containing
               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.4, 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
                     ProblemDetails containing
                        detail set to any_value
                     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
            }
@@ -227,14 +355,13 @@ Package plat_mp1_dns_rules {


   Test Purpose {
      TP Id "TP_MEC_PLAT_MP1_DNS_BI_002"
      TP Id "TP_MEC_PLAT_DNS_005_NF"

      Test objective
         "Check that the IUT responds with an error when queried by a MEC Application 
         which provides a non-existing DNS rule identifier"
         "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.4, clause 7.13.3.1",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.yaml#/definitions/ProblemDetails"
      Reference "ETSI GS MEC 011 V2.0.4, clause 7.13.3.2"

      Config Id Config_MEC_1

@@ -245,8 +372,8 @@ Package plat_mp1_dns_rules {
         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
         the IUT entity "not" having a dns_rules containing
            rule_id indicating value NON_EXISTENT_DNS_RULE_ID
         ;
      }

@@ -254,24 +381,71 @@ Package plat_mp1_dns_rules {
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  Uri indicating value "mp1/v1/applications/{APP_INSTANCE_ID}/dns_rules/NON_EXISTING_DNS_RULE_ID" 
               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.1
               the IUT entity sends a HttpMsg containing
               // 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.4, 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
                     ProblemDetails containing
                        detail set to any_value
                     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
            }
         }
   }

}
+1901 −0

File added.

Preview size limit exceeded, changes collapsed.

+387 −43

File changed.

Preview size limit exceeded, changes collapsed.

Loading