Commit d47f8ffd authored by YannGarcia's avatar YannGarcia
Browse files

TTF T024: Review MEC011 Timing & TrafficRules TPs

parent 174c8df5
Loading
Loading
Loading
Loading
+17 −19
Original line number Diff line number Diff line
@@ -18,7 +18,10 @@ Package MEC_MEC011_SRV_TIME {
         "Check that the IUT responds with timing capabilities 
         when queried by a MEC Application"
      
      Reference "ETSI GS MEC 011 3.2.1, clause 7.2.5.3.1",
      Reference 
        "ETSI GS MEC 011 3.2.1, clause 5.2.10.3",
        "ETSI GS MEC 011 3.2.1, clause 7.1.2.4",
        "ETSI GS MEC 011 3.2.1, clause 7.2.5.3.1",
        "https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#L758#/definition/TimingCaps" //Outdated
      
      Config Id Config_MEC_1
@@ -34,8 +37,7 @@ Package MEC_MEC011_SRV_TIME {
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  uri indicating value "mec_app_support/v2/timing/timing_caps"
               ;
                  uri indicating value "mec_app_support/v2/timing/timing_caps";
               from the MEC_APP entity
            }
            then {
@@ -43,9 +45,7 @@ Package MEC_MEC011_SRV_TIME {
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "200 OK"
                  body containing
                     TimingCaps set to any_value
                  ;
               ;
                     TimingCaps set to any_value;;
               to the MEC_APP entity
            }
         }
@@ -56,11 +56,13 @@ Package MEC_MEC011_SRV_TIME {
      TP Id "TP_MEC_MEC011_SRV_TIME_002_OK" 
      
      Test objective 
         "Check that the IUT responds with current time
         when queried by a MEC Application"
         "Check that the IUT responds with current time when queried by a MEC Application"
      
      Reference "ETSI GS MEC 011 3.2.1, clause 7.2.6.3.1",
        "https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#L410#/definitions/CurrentTime" //Outdated
      Reference 
        "ETSI GS MEC 011 3.2.1, clause 5.2.10.2",
        "ETSI GS MEC 011 3.2.1, clause 7.1.2.5",
        "ETSI GS MEC 011 3.2.1, clause 7.2.5.3.1",
        "https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#L758#/definition/CurrentTime" //Outdated

      Config Id Config_MEC_1
      
@@ -75,8 +77,7 @@ Package MEC_MEC011_SRV_TIME {
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  uri indicating value "mec_app_support/v2/timing/current_time"
               ;
                  uri indicating value "mec_app_support/v2/timing/current_time";
               from the MEC_APP entity
            }
            then {
@@ -87,10 +88,7 @@ Package MEC_MEC011_SRV_TIME {
                     CurrentTime containing
                        seconds set to CURRENT_TIME_SECONDS,
                        nanoSeconds set to CURRENT_TIME_NANOSECONDS,
                     	timeSourceStatus set to TIME_SOURCE_STATUS
                     ;
                  ;
               ;
                        timeSourceStatus set to TIME_SOURCE_STATUS;;;
               to the MEC_APP entity
            }
         }
+69 −95
Original line number Diff line number Diff line
@@ -14,10 +14,12 @@ Package MEC_MEC011_SRV_TRAF {
      TP Id "TP_MEC_MEC011_SRV_TRAF_001_OK"

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

      Reference "ETSI GS MEC 011 3.2.1, clause 7.2.7.3.1",
      Reference 
        "ETSI GS MEC 011 3.2.1, clause 5.2.7",
        "ETSI GS MEC 011 3.2.1, clause 7.1.2.2",
        "ETSI GS MEC 011 3.2.1, clause 7.2.7.3.1",
        "https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#L1352#/definitions/TrafficRule" //Outdated

      Config Id Config_MEC_1
@@ -27,8 +29,7 @@ Package MEC_MEC011_SRV_TRAF {
      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
         ;
            instance_id indicating value APP_INSTANCE_ID;
      }

      // MEC 011 3.2.1, clause 5.2.7
@@ -36,8 +37,7 @@ Package MEC_MEC011_SRV_TRAF {
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  uri indicating value "mec_app_support/v2/applications/{APP_INSTANCE_ID}/traffic_rules"
               ;
                  uri indicating value "mec_app_support/v2/applications/{APP_INSTANCE_ID}/traffic_rules";
               from the MEC_APP entity
            }
            then {
@@ -45,9 +45,7 @@ Package MEC_MEC011_SRV_TRAF {
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "200 OK"
                  body containing
                     TrafficRule set to any_value	//@TODO: Should be a list of TrafficRules. How can this be expressed in TDL 
                  ;
               ;
                     TrafficRule set to any_value;; //@TODO: Should be a list of TrafficRules. How can this be expressed in TDL 
               to the MEC_APP entity
            }
         }
@@ -58,10 +56,13 @@ Package MEC_MEC011_SRV_TRAF {
      TP Id "TP_MEC_MEC011_SRV_TRAF_001_NF"

      Test objective
         "Check that the IUT responds with an error when
         a request for an unknown URI is sent by a MEC Application"
         "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 3.2.1, clause 7.2.7.3.1"
      Reference 
        "ETSI GS MEC 011 3.2.1, clause 5.2.7",
        "ETSI GS MEC 011 3.2.1, clause 7.1.2.2",
        "ETSI GS MEC 011 3.2.1, clause 7.2.7.3.1",
        "https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#L1352#/definitions/TrafficRule" //Outdated

      Config Id Config_MEC_1

@@ -70,8 +71,7 @@ Package MEC_MEC011_SRV_TRAF {
      Initial conditions  with {
         the IUT entity being_in idle_state and
         the IUT entity not having a apps_instance containing
            instance_id indicating value NON_EXISTENT_APP_INSTANCE_ID
         ;
            instance_id indicating value NON_EXISTENT_APP_INSTANCE_ID;
      }

      // MEC 011 3.2.1, clause 5.2.7
@@ -79,15 +79,13 @@ Package MEC_MEC011_SRV_TRAF {
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  uri indicating value "mec_app_support/v2/applications/{NON_EXISTENT_APP_INSTANCE_ID}/traffic_rules"
               ;
                  uri indicating value "mec_app_support/v2/applications/{NON_EXISTENT_APP_INSTANCE_ID}/traffic_rules";
               from the MEC_APP entity
            }
            then {
               // MEC 011 3.2.1, clause 7.2.7.3.1
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "404 Not Found"
               ;
                  status_code set to "404 Not Found";
               to the MEC_APP entity
            }
         }
@@ -101,7 +99,10 @@ Package MEC_MEC011_SRV_TRAF {
         "Check that the IUT responds with the information on a specific traffic rule
         when queried by a MEC Application"

      Reference "ETSI GS MEC 011 3.2.1, clause 7.2.8.3.1",
      Reference 
        "ETSI GS MEC 011 3.2.1, clause 5.2.7",
        "ETSI GS MEC 011 3.2.1, clause 7.1.2.2",
        "ETSI GS MEC 011 3.2.1, clause 7.2.8.3.1",
        "https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#L1352#/definitions/TrafficRule" //Outdated

      Config Id Config_MEC_1
@@ -111,11 +112,9 @@ Package MEC_MEC011_SRV_TRAF {
      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
            instance_id indicating value APP_INSTANCE_ID; and
         the IUT entity having a traffic_rules containing
            rule_id indicating value TRAFFIC_RULE_ID
         ;
            rule_id indicating value TRAFFIC_RULE_ID;
      }

      // MEC 011 3.2.1, clause 5.2.7
@@ -123,8 +122,7 @@ Package MEC_MEC011_SRV_TRAF {
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  uri indicating value "mec_app_support/v2/applications/{APP_INSTANCE_ID}/traffic_rules/{TRAFFIC_RULE_ID}"
               ;
                  uri indicating value "mec_app_support/v2/applications/{APP_INSTANCE_ID}/traffic_rules/{TRAFFIC_RULE_ID}";
               from the MEC_APP entity
            }
            then {
@@ -133,10 +131,7 @@ Package MEC_MEC011_SRV_TRAF {
                  status_code set to "200 OK"
                  body containing
                     TrafficRule containing
                        trafficRuleId set to TRAFFIC_RULE_ID
                     ;
                  ;
               ;
                        trafficRuleId set to TRAFFIC_RULE_ID;;;
               to the MEC_APP entity
            }
         }
@@ -147,10 +142,12 @@ Package MEC_MEC011_SRV_TRAF {
      TP Id "TP_MEC_MEC011_SRV_TRAF_003_OK"

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

      Reference "ETSI GS MEC 011 3.2.1, clause 7.2.8.3.2",
      Reference 
        "ETSI GS MEC 011 3.2.1, clause 5.2.7",
        "ETSI GS MEC 011 3.2.1, clause 7.1.2.2",
        "ETSI GS MEC 011 3.2.1, clause 7.2.8.3.2",
        "https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#L1352#/definitions/TrafficRule" //Outdated

      Config Id Config_MEC_1
@@ -160,11 +157,9 @@ Package MEC_MEC011_SRV_TRAF {
      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
            instance_id indicating value APP_INSTANCE_ID; and
         the IUT entity having a traffic_rules containing
            rule_id indicating value TRAFFIC_RULE_ID
         ;
            rule_id indicating value TRAFFIC_RULE_ID;
      }

      // MEC 011 3.2.1, clause 5.2.7
@@ -175,10 +170,7 @@ Package MEC_MEC011_SRV_TRAF {
                  uri indicating value "mec_app_support/v2/applications/{APP_INSTANCE_ID}/traffic_rules/{TRAFFIC_RULE_ID}",
                  body containing
                     TrafficRule containing
                        action indicating value "DROP"
                     ;
                  ;
               ;
                        action indicating value "DROP";;;
               from the MEC_APP entity
            }
            then {
@@ -188,24 +180,23 @@ Package MEC_MEC011_SRV_TRAF {
                  body containing
                     TrafficRule containing
                        trafficRuleId set to TRAFFIC_RULE_ID,
                        action set to "DROP"
                     ;
                  ;
               ;
                        action set to "DROP";;;
               to the MEC_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_MEC011_SRV_TRAF_003_BR"

      Test objective
         "Check that the IUT responds with an error when
         a request with incorrect parameters is sent by a MEC Application"
         "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 3.2.1, clause 7.2.8.3.2"
      Reference 
        "ETSI GS MEC 011 3.2.1, clause 5.2.7",
        "ETSI GS MEC 011 3.2.1, clause 7.1.2.2",
        "ETSI GS MEC 011 3.2.1, clause 7.2.8.3.2",
        "https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#L1352#/definitions/TrafficRule" //Outdated

      Config Id Config_MEC_1

@@ -214,11 +205,9 @@ Package MEC_MEC011_SRV_TRAF {
      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
            instance_id indicating value APP_INSTANCE_ID; and
         the IUT entity having a traffic_rules containing
            rule_id indicating value TRAFFIC_RULE_ID
         ;
            rule_id indicating value TRAFFIC_RULE_ID;
      }

      // MEC 011 3.2.1, clause 5.2.7
@@ -229,18 +218,13 @@ Package MEC_MEC011_SRV_TRAF {
                  uri indicating value "mec_app_support/v2/applications/{APP_INSTANCE_ID}/traffic_rules/{TRAFFIC_RULE_ID}",
                  body containing
                     TrafficRule containing
                        // Invalid parameter value should trigger an error response.
                        action indicating value UNKNOWN_VALUE
                     ;
                  ;
               ;
                        action indicating value UNKNOWN_VALUE;;; // Invalid parameter value should trigger an error response.
               from the MEC_APP entity
            }
            then {
               // MEC 011 3.2.1, clause 7.2.8.3.2
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "400 Bad Request"
               ;
                  status_code set to "400 Bad Request";
               to the MEC_APP entity
            }
         }
@@ -251,10 +235,13 @@ Package MEC_MEC011_SRV_TRAF {
      TP Id "TP_MEC_MEC011_SRV_TRAF_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"
         "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 3.2.1, clause 7.2.8.3.2"
      Reference 
        "ETSI GS MEC 011 3.2.1, clause 5.2.7",
        "ETSI GS MEC 011 3.2.1, clause 7.1.2.2",
        "ETSI GS MEC 011 3.2.1, clause 7.2.8.3.2",
        "https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#L1352#/definitions/TrafficRule" //Outdated

      Config Id Config_MEC_1

@@ -263,11 +250,9 @@ Package MEC_MEC011_SRV_TRAF {
      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
            instance_id indicating value APP_INSTANCE_ID; and
         the IUT entity not having a traffic_rules containing
            rule_id indicating value NON_EXISTENT_TRAFFIC_RULE_ID
         ;
            rule_id indicating value NON_EXISTENT_TRAFFIC_RULE_ID;
      }

      // MEC 011 3.2.1, clause 5.2.7
@@ -278,34 +263,29 @@ Package MEC_MEC011_SRV_TRAF {
                  uri indicating value "mec_app_support/v2/applications/{APP_INSTANCE_ID}/traffic_rules/{NON_EXISTENT_TRAFFIC_RULE_ID}",
                  body containing
                     TrafficRule containing
                        action indicating value "DROP"
                     ;
                  ;
               ;
                        action indicating value "DROP";;;
               from the MEC_APP entity
            }
            then {
               // MEC 011 3.2.1, clause 7.2.8.3.2
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "404 Not Found"
               ;
                  status_code set to "404 Not Found";
               to the MEC_APP entity
            }
         }
   }

/* 
 
   //@TODO: Commented as ETag is not mandatory
 
   Test Purpose {
      TP Id "TP_MEC_MEC011_SRV_TRAF_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"
         "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 3.2.1, clause 7.2.8.3.2"
      Reference 
        "ETSI GS MEC 011 3.2.1, clause 5.2.7",
        "ETSI GS MEC 011 3.2.1, clause 7.1.2.2",
        "ETSI GS MEC 011 3.2.1, clause 7.2.8.3.2",
        "https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#L1352#/definitions/TrafficRule" //Outdated

      Config Id Config_MEC_1

@@ -314,11 +294,9 @@ Package MEC_MEC011_SRV_TRAF {
      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
            instance_id indicating value APP_INSTANCE_ID; and
         the IUT entity having a traffic_rules containing
            rule_id indicating value TRAFFIC_RULE_ID
         ;
            rule_id indicating value TRAFFIC_RULE_ID;
      }

      // MEC 011 3.2.1, clause 5.2.7
@@ -327,23 +305,19 @@ Package MEC_MEC011_SRV_TRAF {
            when {
               the IUT entity receives a vPUT containing
                  uri indicating value "mec_app_support/v2/applications/{APP_INSTANCE_ID}/traffic_rules/{TRAFFIC_RULE_ID}",
                  if_match indicating value INVALID_ETAG
                  if_match indicating value INVALID_ETAG,
                  body containing
                     TrafficRule containing
                        action indicating value "DROP"
                     ;
                  ;
               ;
                        action indicating value "DROP";;;
               from the MEC_APP entity
            }
            then {
               // MEC 011 3.2.1, clause 7.2.8.3.2
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "412 Precondition Failed"
               ;
                  status_code set to "412 Precondition Failed";
               to the MEC_APP entity
            }
         }
   }
*/

}