fix:(test case)主动防御测试用例删除profileId

This commit is contained in:
wangxin
2020-06-16 18:13:05 +08:00
parent 8a41c0112b
commit e9893ac45d
3 changed files with 42 additions and 7 deletions

View File

@@ -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}