1、Allow_Http_test.robot修改错误用例:ProxyPolicy-Allow-Http-00001
2、LoginLogout.robot调整UIAPI白名单删除问题; 3、ManaeObjectBody.robot修改格式错误; 4、合并删除一级对象和多级对象方法
This commit is contained in:
@@ -18,7 +18,7 @@ ProxyPolicy-Allow-Http-00001
|
|||||||
[Tags] selfserver ip
|
[Tags] selfserver ip
|
||||||
Comment 创建url
|
Comment 创建url
|
||||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${objectDic1t} ${objectDic1t}
|
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||||
${objectids} set Variable ${objectId}
|
${objectids} set Variable ${objectId}
|
||||||
Comment 创建安全策略
|
Comment 创建安全策略
|
||||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol": "HTTP"} filterList= isValid=${1} appIdObjects=2
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol": "HTTP"} filterList= isValid=${1} appIdObjects=2
|
||||||
|
|||||||
@@ -75,14 +75,16 @@ ApiLogoutAndDelLocalIP
|
|||||||
[Tags] tsg_adc tsg_bf_api
|
[Tags] tsg_adc tsg_bf_api
|
||||||
log ApiLogoutAndDelLocalIP
|
log ApiLogoutAndDelLocalIP
|
||||||
log to_LogoutAndDelLocalIP_LogoutAndDelLocalIP
|
log to_LogoutAndDelLocalIP_LogoutAndDelLocalIP
|
||||||
|
#删除tsgUIAPI 先删除白名单,是因为此策略也引用了本机IP
|
||||||
|
Run Keyword If ${addTsgUIAPIFlag}==1 SecurityPolicy-Allow-TSGUIAPI-DEL
|
||||||
|
|
||||||
Run Keyword If ${addTestClentIPFlag}==1 DelLocalIPObject
|
Run Keyword If ${addTestClentIPFlag}==1 DelLocalIPObject
|
||||||
|
|
||||||
|
|
||||||
#ApiDeleteAutoTagsCase
|
#ApiDeleteAutoTagsCase
|
||||||
loginlogout.Logout
|
loginlogout.Logout
|
||||||
#[Return] ${rescode}
|
#[Return] ${rescode}
|
||||||
|
|
||||||
#添加tsgUIAPI
|
|
||||||
Run Keyword If ${addTsgUIAPIFlag}==1 SecurityPolicy-Allow-TSGUIAPI-DEL
|
|
||||||
|
|
||||||
CliLogin
|
CliLogin
|
||||||
[Tags] tsg_cli cli_login
|
[Tags] tsg_cli cli_login
|
||||||
Open Connection ${cliHost}
|
Open Connection ${cliHost}
|
||||||
@@ -112,5 +114,7 @@ SecurityPolicy-Allow-TSGUIAPI-Add
|
|||||||
SecurityPolicy-Allow-TSGUIAPI-DEL
|
SecurityPolicy-Allow-TSGUIAPI-DEL
|
||||||
[Tags] uiallow
|
[Tags] uiallow
|
||||||
log toDelTSGUIAPI
|
log toDelTSGUIAPI
|
||||||
DeletePolicyAndObject ${testBifangPolicy} ${testBifangIP}
|
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${testBifangPolicy}]}
|
||||||
|
${policyIds} Create List ${policyId1}
|
||||||
|
DeletePolicyAndObject ${policyIds} ${testBifangIP}
|
||||||
log delTSGUIAPISucess
|
log delTSGUIAPISucess
|
||||||
@@ -63,12 +63,19 @@ AddLocalIPObject
|
|||||||
|
|
||||||
DelLocalIPObject
|
DelLocalIPObject
|
||||||
log to_DelLocalIPObject
|
log to_DelLocalIPObject
|
||||||
${response} BaseDeleteRequest /${version}/policy/object {"objectIds":[${testClentID}]}
|
|
||||||
|
${emptyList} Create List
|
||||||
|
${objectId1} Create List [${testClentID},${testClentSubID}]
|
||||||
|
DeletePolicyAndGroupObject ${emptyList} ${objectId1}
|
||||||
|
SET GLOBAL VARIABLE ${testClentID} ${EMPTY}
|
||||||
|
SET GLOBAL VARIABLE ${testClentSubID} ${EMPTY}
|
||||||
|
|
||||||
|
#${response} BaseDeleteRequest /${version}/policy/object {"objectIds":[${testClentID}]}
|
||||||
#${response_code} Get From Dictionary ${response} code
|
#${response_code} Get From Dictionary ${response} code
|
||||||
#Should Be Equal As Strings ${response} {'code': 200, 'msg': 'Success', 'success': True}
|
#Should Be Equal As Strings ${response} {'code': 200, 'msg': 'Success', 'success': True}
|
||||||
SET GLOBAL VARIABLE ${testClentID} ${EMPTY}
|
#SET GLOBAL VARIABLE ${testClentID} ${EMPTY}
|
||||||
${response} BaseDeleteRequest /${version}/policy/object {"objectIds":[${testClentSubID}]}
|
#${response} BaseDeleteRequest /${version}/policy/object {"objectIds":[${testClentSubID}]}
|
||||||
SET GLOBAL VARIABLE ${testClentSubID} ${EMPTY}
|
#SET GLOBAL VARIABLE ${testClentSubID} ${EMPTY}
|
||||||
|
|
||||||
AddObject
|
AddObject
|
||||||
[Arguments] ${body}
|
[Arguments] ${body}
|
||||||
@@ -303,19 +310,23 @@ DeleteProfiles
|
|||||||
DeletePolicyAndObject
|
DeletePolicyAndObject
|
||||||
[Arguments] ${policyids} ${objectids}
|
[Arguments] ${policyids} ${objectids}
|
||||||
#删除和对象
|
#删除和对象
|
||||||
|
#2020-09-01修改,引用DeletePolicyAndGroupObject,避免分别维护并兼容之前用例
|
||||||
|
${objectId1} Create List [${objectids}]
|
||||||
|
DeletePolicyAndGroupObject ${policyIds} ${objectId1}
|
||||||
|
|
||||||
#删除策略
|
#删除策略
|
||||||
log toDeletePolicy_DeletePolicyAndObject
|
#log toDeletePolicy_DeletePolicyAndObject
|
||||||
${listlenth}= Get Length ${policyids}
|
#${listlenth}= Get Length ${policyids}
|
||||||
FOR ${var} IN RANGE ${listlenth}
|
#FOR ${var} IN RANGE ${listlenth}
|
||||||
#log dxytest111111
|
#log dxytest111111
|
||||||
log ${var}
|
#log ${var}
|
||||||
DeletePolicy ${policyids}[${var}]
|
#DeletePolicy ${policyids}[${var}]
|
||||||
#Should Contain ${commandreturn} ${ca}
|
#Should Contain ${commandreturn} ${ca}
|
||||||
END
|
#END
|
||||||
#删除对象
|
#删除对象
|
||||||
log todeleteobj_DeletePolicyAndObject
|
#log todeleteobj_DeletePolicyAndObject
|
||||||
Run Keyword If "${objectids}"=="${EMPTY}" log no obj to del
|
#Run Keyword If "${objectids}"=="${EMPTY}" log no obj to del
|
||||||
... ELSE DeleteObject ${objectids}
|
# ... ELSE DeleteObject ${objectids}
|
||||||
|
|
||||||
DeletePolicyAndGroupObject
|
DeletePolicyAndGroupObject
|
||||||
[Arguments] ${policyids} ${objectids}
|
[Arguments] ${policyids} ${objectids}
|
||||||
|
|||||||
Reference in New Issue
Block a user