fix:(test case)主动防御测试用例删除profileId
This commit is contained in:
@@ -177,7 +177,24 @@ DeleteObject
|
||||
${response} Convert to String ${response}
|
||||
log ${response}
|
||||
#Should Be Equal As Strings ${response} {'code': 200, 'msg': 'Success', 'success': True}
|
||||
|
||||
|
||||
DeleteProfile
|
||||
[Arguments] ${typeUrl} ${profileIds}
|
||||
#删除对象
|
||||
log DeleteProfile
|
||||
${response} BaseDeleteRequest /${version}/policy/profile/${typeUrl} {"profileIds":[${profileIds}]}
|
||||
${response_code} Get From Dictionary ${response} code
|
||||
#log aaaaaaaaaa:${response_code}
|
||||
Should Be Equal As Strings ${response_code} 200
|
||||
#Integer ${response_code} 200
|
||||
${response} Convert to String ${response}
|
||||
log ${response}
|
||||
#Should Be Equal As Strings ${response} {'code': 200, 'msg': 'Success', 'success': True}
|
||||
DeleteProfiles
|
||||
[Arguments] ${profiles}
|
||||
FOR ${profile} IN @{profiles}
|
||||
Run Keyword If "${profile}"!="" and ${profile}!="${EMPTY}" DeleteProfile ${profile}[typeUrl] ${profile}[profileIds]
|
||||
END
|
||||
DeletePolicyAndObject
|
||||
[Arguments] ${policyids} ${objectids}
|
||||
#删除和对象
|
||||
@@ -193,8 +210,12 @@ DeletePolicyAndObject
|
||||
#删除对象
|
||||
log todeleteobj_DeletePolicyAndObject
|
||||
Run Keyword If "${objectids}"=="${EMPTY}" log no obj to del
|
||||
... ELSE DeleteObject ${objectids}
|
||||
|
||||
... ELSE DeleteObject ${objectids}
|
||||
|
||||
DeletePolicyAndObjectAndProfile
|
||||
[Arguments] ${policyids} ${objectids} ${profiles}
|
||||
DeletePolicyAndObject ${policyids} ${objectids}
|
||||
DeleteProfiles ${profiles}
|
||||
DeleteAfterCase
|
||||
[Arguments] ${policyids} ${objectids}
|
||||
Run Keyword If '${testPart}'=='all' or '${testPart}'=='3' DeletePolicyAndObject ${policyids} ${objectids}
|
||||
|
||||
@@ -85,6 +85,15 @@ WxPolicyOrganize
|
||||
[Arguments] ${policy} ${opAction} ${policyObjectVersion}
|
||||
Log To Console Call WxPolicyOrganize
|
||||
${emptyList} Create List
|
||||
#v1版本接口与v2版本接口不同的字段
|
||||
Run Keyword If "${policyObjectVersion}"=="v1" Dictionary Should Not Contain Key ${policy} source
|
||||
Run Keyword If "${policyObjectVersion}"=="v1" Dictionary Should Not Contain Key ${policy} destination
|
||||
Run Keyword If "${policyObjectVersion}"=="v1" Dictionary Should Not Contain Key ${policy} filterList
|
||||
Run Keyword If "${policyObjectVersion}"=="v1" Dictionary Should Not Contain Key ${policy} appIdObjects
|
||||
|
||||
Run Keyword If "${policyObjectVersion}"=="v2" Dictionary Should Not Contain Key ${policy} referenceObject
|
||||
Run Keyword If "${policyObjectVersion}"=="v2" Dictionary Should Not Contain Key ${policy} appObjectIdArray
|
||||
|
||||
# 取可选参数,为传入设置默认值
|
||||
${return} ${policyName} Run Keyword And Ignore Error Get From Dictionary ${policy} policyName
|
||||
Run Keyword If "${return}"=="FAIL" or "${policyName}"=="${EMPTY}" Set To Dictionary ${policy} policyName=${Default_PolicyName}
|
||||
|
||||
Reference in New Issue
Block a user