diff options
| author | hebingning <[email protected]> | 2022-05-30 10:11:14 +0800 |
|---|---|---|
| committer | hebingning <[email protected]> | 2022-05-30 10:11:14 +0800 |
| commit | dd34eddad75da8d8af940ca1ea9c143ddc4b14de (patch) | |
| tree | 8b9efdd2a704aa33c8e54da767709e33de1e81e1 | |
| parent | 8058cc145e5b8102a888b19b0d6533af9c05564c (diff) | |
策略验证关闭逻辑单独提交
| -rw-r--r-- | case/policies/security/traffic_replay/traffic_replay.robot | 4 | ||||
| -rw-r--r-- | keyword/policys/policy.robot | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/case/policies/security/traffic_replay/traffic_replay.robot b/case/policies/security/traffic_replay/traffic_replay.robot index 6882a59..c592b8f 100644 --- a/case/policies/security/traffic_replay/traffic_replay.robot +++ b/case/policies/security/traffic_replay/traffic_replay.robot @@ -32,6 +32,10 @@ gtp-policy-with-traffic-replay [Tags] Memory CPU Gtp ${policyIds} CreatePolicyByJson {"opAction":"add","returnData":1,"refuseCode":true,"policyList":{"policyId":"","policyName":"testgtp","policyType":"tsg_security","action":"monitor","userTags":"","doBlacklist":0,"doLog":1,"policyDesc":"","effectiveRange":{},"userRegion":{"protocol":"GTP","traffic_mirror":{"enable":0,"mirror_profile":null},"packet_capture":{"enable":0}},"source":[],"destination":[],"filterList":[],"appIdObjects":[104],"appSelectorObjects":[],"isValid":0,"scheduleId":[]}} ExecuteScript ${path}/data/security/traffic_replay/${TEST NAME}.yaml ${TEST NAME} + +http-only-traffic-replay + [Tags] Memory CPU Gtp + ExecuteScript ${path}/data/security/traffic_replay/${TEST NAME}.yaml ${TEST NAME} diff --git a/keyword/policys/policy.robot b/keyword/policys/policy.robot index fdcdeb1..cf83088 100644 --- a/keyword/policys/policy.robot +++ b/keyword/policys/policy.robot @@ -772,6 +772,9 @@ ExcuteFtpCommand ${return} ${res} Run Keyword And Ignore Error Read delay=15s
${returnIsExcute} ${excute} Run Keyword And Ignore Error Should Contain ${res} ${hopeResult}
+ # ${returnIsExcute} Run Keyword If "${returnIsExcute}"=="FAIL" Run Keyword And Continue On Failure Wait Until Keyword Succeeds 5min 30sec RetryCommand ${command} ${commandRes}
+ # ... ELSE Set Variable ${returnIsExcute}
+
sleep ${policyLogVerificationSleepSeconds}
Log 获取结束时间
${endtime} Run Keyword If "${isUTC}"=="True" Get Current Date UTC exclude_millis=True
@@ -1313,7 +1316,7 @@ CreatePolicysAndObjects ${return} ${effectiveRange} Run Keyword And Ignore Error Get From Dictionary ${policyData} effectiveRange
#${effectiveRange} Run Keyword If "${return}"!="FAIL" Set Variable ${effectiveRange} ELSE Set Variable ${EMPTY}
- ${policyJson} = Run Keyword If "${return}"!="FAIL" and "${effectiveRange}" != "None" Replace String ${policyJson} "effectiveRange": null "effectiveRange": ${effectiveRange}
+ ${policyJson} = Run Keyword If "${return}"!="FAIL" and "${effectiveRange}" != "None" Replace String ${policyJson} "effectiveRange": null "effectiveRange": ${packetCaptureTag}
... ELSE Replace String ${policyJson} "effectiveRange": null "effectiveRange": {}
log ${policyJson}
${return} ${userRegion} Run Keyword And Ignore Error Get From Dictionary ${policyData} userRegion
|
