1、Allow_Http_test.robot修改错误用例:ProxyPolicy-Allow-Http-00001

2、LoginLogout.robot调整UIAPI白名单删除问题;
3、ManaeObjectBody.robot修改格式错误;
4、合并删除一级对象和多级对象方法
This commit is contained in:
dongxiaoyan
2020-09-01 16:39:09 +08:00
parent 920d871fe9
commit e9e809e1a8
4 changed files with 34 additions and 19 deletions

View File

@@ -18,7 +18,7 @@ ProxyPolicy-Allow-Http-00001
[Tags] selfserver ip
Comment 创建url
${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}
Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol": "HTTP"} filterList= isValid=${1} appIdObjects=2

View File

@@ -75,14 +75,16 @@ ApiLogoutAndDelLocalIP
[Tags] tsg_adc tsg_bf_api
log ApiLogoutAndDelLocalIP
log to_LogoutAndDelLocalIP_LogoutAndDelLocalIP
#删除tsgUIAPI 先删除白名单是因为此策略也引用了本机IP
Run Keyword If ${addTsgUIAPIFlag}==1 SecurityPolicy-Allow-TSGUIAPI-DEL
Run Keyword If ${addTestClentIPFlag}==1 DelLocalIPObject
#ApiDeleteAutoTagsCase
loginlogout.Logout
#[Return] ${rescode}
#添加tsgUIAPI
Run Keyword If ${addTsgUIAPIFlag}==1 SecurityPolicy-Allow-TSGUIAPI-DEL
CliLogin
[Tags] tsg_cli cli_login
Open Connection ${cliHost}
@@ -112,5 +114,7 @@ SecurityPolicy-Allow-TSGUIAPI-Add
SecurityPolicy-Allow-TSGUIAPI-DEL
[Tags] uiallow
log toDelTSGUIAPI
DeletePolicyAndObject ${testBifangPolicy} ${testBifangIP}
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${testBifangPolicy}]}
${policyIds} Create List ${policyId1}
DeletePolicyAndObject ${policyIds} ${testBifangIP}
log delTSGUIAPISucess

View File

@@ -63,12 +63,19 @@ AddLocalIPObject
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
#Should Be Equal As Strings ${response} {'code': 200, 'msg': 'Success', 'success': True}
SET GLOBAL VARIABLE ${testClentID} ${EMPTY}
${response} BaseDeleteRequest /${version}/policy/object {"objectIds":[${testClentSubID}]}
SET GLOBAL VARIABLE ${testClentSubID} ${EMPTY}
#SET GLOBAL VARIABLE ${testClentID} ${EMPTY}
#${response} BaseDeleteRequest /${version}/policy/object {"objectIds":[${testClentSubID}]}
#SET GLOBAL VARIABLE ${testClentSubID} ${EMPTY}
AddObject
[Arguments] ${body}
@@ -303,19 +310,23 @@ DeleteProfiles
DeletePolicyAndObject
[Arguments] ${policyids} ${objectids}
#删除和对象
#2020-09-01修改引用DeletePolicyAndGroupObject避免分别维护并兼容之前用例
${objectId1} Create List [${objectids}]
DeletePolicyAndGroupObject ${policyIds} ${objectId1}
#删除策略
log toDeletePolicy_DeletePolicyAndObject
${listlenth}= Get Length ${policyids}
FOR ${var} IN RANGE ${listlenth}
#log toDeletePolicy_DeletePolicyAndObject
#${listlenth}= Get Length ${policyids}
#FOR ${var} IN RANGE ${listlenth}
#log dxytest111111
log ${var}
DeletePolicy ${policyids}[${var}]
#log ${var}
#DeletePolicy ${policyids}[${var}]
#Should Contain ${commandreturn} ${ca}
END
#END
#删除对象
log todeleteobj_DeletePolicyAndObject
Run Keyword If "${objectids}"=="${EMPTY}" log no obj to del
... ELSE DeleteObject ${objectids}
#log todeleteobj_DeletePolicyAndObject
#Run Keyword If "${objectids}"=="${EMPTY}" log no obj to del
# ... ELSE DeleteObject ${objectids}
DeletePolicyAndGroupObject
[Arguments] ${policyids} ${objectids}

View File

@@ -92,7 +92,7 @@ ManageStrItemList
END
[Return] ${returnList}
IpItemType11
[Arguments] ${str}
[Arguments] ${str}
${obj} Create Dictionary
${values} Evaluate re.split('[|]', '${str}') re
${isSession} Convert To Integer ${values}[0]