summaryrefslogtreecommitdiffstats
path: root/robot/resources/test_templates/closedloop_test_template.robot
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-11-02 11:27:28 -0700
committerGary Wu <gary.i.wu@huawei.com>2018-11-02 11:27:28 -0700
commit5323bc2f68a6cd5d4114bbbd3e5f9f5da1e83f4e (patch)
tree8a3cceff63259fab350d7c0007f3d5d938bda302 /robot/resources/test_templates/closedloop_test_template.robot
parent12711024fae13304c94fa436647ad4d828e65d21 (diff)
Fix parsing in closed loop policy checks
Also added new tags to assist per-suite debugging. Change-Id: Ice67dee685f2ee583ae54c0bba1ca7358f842da1 Issue-ID: INT-586 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'robot/resources/test_templates/closedloop_test_template.robot')
-rw-r--r--robot/resources/test_templates/closedloop_test_template.robot31
1 files changed, 12 insertions, 19 deletions
diff --git a/robot/resources/test_templates/closedloop_test_template.robot b/robot/resources/test_templates/closedloop_test_template.robot
index f83ce5b1..fe33e749 100644
--- a/robot/resources/test_templates/closedloop_test_template.robot
+++ b/robot/resources/test_templates/closedloop_test_template.robot
@@ -55,7 +55,7 @@ VFW Policy
Log Suite name ${SUITE NAME} ${TEST NAME} ${PREV TEST NAME}
Initialize VFW Policy
${stackname}= Orchestrate VNF vFW closedloop
- Policy Check Firewall Stack ${stackname} ${VFWPOLICYRATE}
+ Policy Check FirewallCL Stack ${stackname} ${VFWPOLICYRATE}
Delete VNF
VDNS Policy
@@ -85,22 +85,17 @@ Get Configs VFW Policy
${json}= Parse Json ${get_resp.content}
${config}= Parse Json ${json[0]["config"]}
+ ${thresholds}= Get Variable Value ${config["content"]["tca_policy"]["metricsPerEventName"][0]["thresholds"]}
# Extract object1 from Array
- ${severity}= Get Variable Value ${config["content"]["thresholds"][0]["severity"]}
- Should Be Equal ${severity} ${Expected_Severity_1}
- ${Thresold_Value}= Get Variable Value ${config["content"]["thresholds"][0]["thresholdValue"]}
- Should Be Equal As Integers ${Thresold_Value} ${Expected_Threshold_1}
- ${direction}= Get Variable Value ${config["content"]["thresholds"][0]["direction"]}
- Should Be Equal ${direction} ${Expected_Direction_1}
+ Should Be Equal ${thresholds[0]["severity"]} ${Expected_Severity_1}
+ Should Be Equal As Integers ${thresholds[0]["thresholdValue"]} ${Expected_Threshold_1}
+ Should Be Equal ${thresholds[0]["direction"]} ${Expected_Direction_1}
# Extract object2 from Array
- ${severity_1}= Get Variable Value ${config["content"]["thresholds"][1]["severity"]}
- Should Be Equal ${severity_1} ${Expected_Severity_2}
- ${Thresold_Value_1}= Get Variable Value ${config["content"]["thresholds"][1]["thresholdValue"]}
- Should Be Equal As Integers ${Thresold_Value_1} ${Expected_Threshold_2}
- ${direction_1}= Get Variable Value ${config["content"]["thresholds"][1]["direction"]}
- Should Be Equal ${direction_1} ${Expected_Direction_2}
+ Should Be Equal ${thresholds[1]["severity"]} ${Expected_Severity_2}
+ Should Be Equal As Integers ${thresholds[1]["thresholdValue"]} ${Expected_Threshold_2}
+ Should Be Equal ${thresholds[1]["direction"]} ${Expected_Direction_2}
Get Configs VDNS Policy
[Documentation] Get Config Policy for VDNS
@@ -111,14 +106,12 @@ Get Configs VDNS Policy
Should Be Equal As Strings ${get_resp.status_code} 200
${json}= Parse Json ${get_resp.content}
${config}= Parse Json ${json[0]["config"]}
+ ${thresholds}= Get Variable Value ${config["content"]["tca_policy"]["metricsPerEventName"][0]["thresholds"]}
# Extract object1 from Array
- ${severity}= Get Variable Value ${config["content"]["tca_policy"]["metricsPerEventName"][0]["thresholds"][0]["severity"]}
- Should Be Equal ${severity} ${Expected_Severity_2}
- ${Thresold_Value}= Get Variable Value ${config["content"]["tca_policy"]["metricsPerEventName"][0]["thresholds"][0]["thresholdValue"]}
- Should Be Equal As Integers ${Thresold_Value} ${Expected_Threshold_1}
- ${direction}= Get Variable Value ${config["content"]["tca_policy"]["metricsPerEventName"][0]["thresholds"][0]["direction"]}
- Should Be Equal ${direction} ${Expected_Direction_3}
+ Should Be Equal ${thresholds[0]["severity"]} ${Expected_Severity_2}
+ Should Be Equal As Integers ${thresholds[0]["thresholdValue"]} ${Expected_Threshold_1}
+ Should Be Equal ${thresholds[0]["direction"]} ${Expected_Direction_3}
Teardown Closed Loop
[Documentation] Tear down a closed loop test case