Revert "21.05版关键字修改"

This reverts commit 17aa195375.
This commit is contained in:
hebingning
2021-05-17 10:09:23 +08:00
parent a9af50c797
commit ae82eba445
28 changed files with 67 additions and 293 deletions

View File

@@ -1,75 +0,0 @@
*** Settings ***
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids} ${categoryIds}
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
Resource ../../../03-Variable/BifangApiVariable.txt
Library json
Library DateTime
*** Variables ***
${policyIds} ${EMPTY}
${objectids} ${EMPTY}
${categoryIds} ${EMPTY}
*** Test Cases ***
ForwardAddCategoriesOneFqdn
Comment 创建categories
${addItemList1} Create Dictionary fqdn=$www.lkong.net
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary categoryType=fqdn categoryName=lkong objectSubType=category isValid=${1} fqdnList=${addItemLists}
${rescode} ${categoryObjId} ${categoryId} AddCategories ${1} ${objectDict} add 200
sleep ${policyModifySleepSeconds}
Comment query Max
QueryCategory pageSize=20&pageNo=1&categoryId=${categoryId}&orderBy=categoryId desc&categoryType=fqdn&categoryName=lkong&isInitialize=0&fqdn=lkong 200
sleep ${policyModifySleepSeconds}
Comment update Category
${addItemList1} Create Dictionary fqdn=*xinxin.lkong.net
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary objectId=${categoryObjId} categoryId=${categoryId} categoryType=fqdn categoryName=lkongchaoji objectSubType=category fqdnList=${addItemLists}
${rescode} ${categoryObjId} ${categoryId} AddCategories ${1} ${objectDict} update 200
${categoryIds} set Variable ${categoryId}
ForwardAddCategoriesMulFqdn
Comment 创建categories
${addItemList1} Create Dictionary fqdn=$www.hao123.com
${addItemList2} Create Dictionary fqdn=*huai123.com
${addItemList3} Create Dictionary fqdn=*baidu.com
${addItemList4} Create Dictionary fqdn=*kuxiu.com
${addItemLists} Create list ${addItemList1} ${addItemList2} ${addItemList3} ${addItemList4}
${objectDict} Create Dictionary categoryType=fqdn categoryName=lkong objectSubType=category isValid=${1} fqdnList=${addItemLists}
${rescode} ${categoryObjId} ${categoryId} AddCategories ${1} ${objectDict} add 200
${categoryIds} set Variable ${categoryId}
ReverseAddCategoriesMulFqdn1
Comment 创建categories
${addItemList1} Create Dictionary fqdn=cuowuwang.com
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary categoryType=fqdn categoryName=lkong objectSubType=category isValid=${1} fqdnList=${addItemLists}
${rescode} ${categoryObjId} ${categoryId} AddCategories ${1} ${objectDict} add 40014018
Comment 创建categories
${addItemList1} Create Dictionary fqdn=cuowuwang.com
${addItemList2} Create Dictionary fqdn=*cuowuwang.com
${addItemLists} Create list ${addItemList1} ${addItemList2}
${objectDict} Create Dictionary categoryType=fqdn categoryName=lkong objectSubType=category isValid=${1} fqdnList=${addItemLists}
${rescode} ${categoryObjId} ${categoryId} AddCategories ${1} ${objectDict} add 40014018
ReverseAddCategoriesMulFqdn2
Comment 创建categories
${addItemList1} Create Dictionary fqdn=*a
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary categoryType=fqdn categoryName=lkong objectSubType=category isValid=${1} fqdnList=${addItemLists}
${rescode} ${categoryObjId} ${categoryId} AddCategories ${1} ${objectDict} add 40014006
ReverseSearchCategories1
QueryCategory pageSize=20&pageNo=1&categoryId=abc 400
ReverseSearchCategories2
QueryCategory pageSize=20&pageNo=1&categoryType=halala 40090025

View File

@@ -1,33 +0,0 @@
*** Settings ***
Test Teardown DeletePolicyAndGroupObject ${policyIds} ${objectIds}
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
Resource ../../../03-Variable/ApplicationID.txt
Library ../../../04-CustomLibrary/Library/delUseless.py
Library ../../../04-CustomLibrary/Custometest/JsonDiff.py
Library json
Library DateTime
*** Variables ***
@{policyIds}
@{profiles}
${objectIds} ${EMPTY}
*** Test Cases ***
fqdn_001
${req_fqdn_data} Set Variable {"opAction":"add","refuseCode":true,"returnData":1,"objectList":{"objectType":"fqdn","objectSubType":"fqdn","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"hbn_test_fqdn","objectDesc":"","subObjectIds":[],"addItemList":[{"keywordArray":["*abcds"],"t":"16191477536650","itemId":"","isHexbin":0,"state":2}],"updateItemList":[],"deleteItemIds":[],"iconColor":"#31739C"}}
${req_del_key} Create List objectType objectSubType
${req_fqdn_data} deal ${req_fqdn_data} ${req_del_key}
log abcdefg
${res_fqdn_data} Set Variable {"code":200,"msg":"Success","data":{"objectList":[{"addItemList":[{"isValid":1,"opUser":1527,"opTime":"2021-04-23 11:16:31","isInitialize":0,"itemName":null,"itemDesc":null,"isHexbin":0,"keywordArray":["abcds"],"itemId":4347060,"objectId":44552}],"deleteItemIds":[],"iconColor":"#31739C","isDisplay":null,"isExclusion":0,"isInitialize":0,"isValid":1,"memberType":1,"objectDesc":"","objectId":44552,"objectName":"hbn_test_fqdn","objectType":"fqdn","opTime":"2021-04-23 11:16:31","opUser":1527,"subObjectIds":[],"updateItemList":[]}]},"success":true}
${res_del_key} Create List opUser opTime itemName itemDesc itemId objectId
${res_fqdn_data} deal ${res_fqdn_data} ${res_del_key}
log ${res_fqdn_data}
${res_code} json_diff ${req_fqdn_data} ${res_fqdn_data}
${compare_code} Set Variable True
Should Be Equal As Strings ${res_code} ${compare_code}
log abcdesssssss