diff options
| author | 姬巍川 <[email protected]> | 2020-05-07 20:34:38 +0800 |
|---|---|---|
| committer | 姬巍川 <[email protected]> | 2020-05-07 20:34:38 +0800 |
| commit | 70b4c4576f6326dd6cb4be8b7b4383e787d1cb2b (patch) | |
| tree | c56e0870ba2236ddb3513c2c355333d7da372d59 | |
| parent | 8ccae9a9679d41a8cb1511594824133478f383b6 (diff) | |
修改策略添加条件成功20-04dev
| -rw-r--r-- | 01-TestCase/tsg_adc/selfserver/Api_Security/Deny_Http_Tests.robot | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/01-TestCase/tsg_adc/selfserver/Api_Security/Deny_Http_Tests.robot b/01-TestCase/tsg_adc/selfserver/Api_Security/Deny_Http_Tests.robot index 16ed239..6399a5f 100644 --- a/01-TestCase/tsg_adc/selfserver/Api_Security/Deny_Http_Tests.robot +++ b/01-TestCase/tsg_adc/selfserver/Api_Security/Deny_Http_Tests.robot @@ -889,12 +889,14 @@ SecurityPolicy-Deny-Http-00030 ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} ${objectids} set Variable ${object_fqdn_Id} Comment 创建url - ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=youtube + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=nationalbank ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00030 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"drop"} referenceObject=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST isValid=${1} appObjectIdArray=2 ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]} Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0002.bat ... ELSE set variable curl http://open.node.com/test/youtube/youtube.html @@ -910,12 +912,10 @@ SecurityPolicy-Deny-Http-00030 GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com Comment 修改策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00030 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"drop"} referenceObject=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appObjectIdArray=2 policyId=${policyId} - ${rescode} ${policyId} EditPolicy ${1} ${policyDict} update - #删除策略 - ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]} + ${rescode} ${policyId} EditPolicy ${policyDict} update Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0002.bat - ... ELSE set variable curl http://open.node.com/test/youtube/youtube.html + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat + ... ELSE set variable curl \ http://open.node.com/test/nationalbank/nationalbank.html ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset ... ELSE Create List Message content over the limit has been removed ${starttime} Get Time @@ -924,5 +924,4 @@ SecurityPolicy-Deny-Http-00030 Sleep ${policyLogVerificationSleepSeconds}s ${endtime} Get Time #日志验证 - ${s} Convert to String ${policyId} GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com |
