TSG-2827修改时间,通过效率,修改标签,用例描述更加准确

This commit is contained in:
jwc
2020-08-10 19:07:01 +08:00
parent 17e4deab39
commit 7afa152d2a
85 changed files with 684 additions and 2319 deletions

View File

@@ -12,7 +12,7 @@ ${url} /v1/policy/profile/responsepages
*** Test Cases ***
Proxy-Policy-deny-00001
[Tags] fqdn
[Tags] fqdn完整匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$newsela.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
@@ -29,7 +29,7 @@ Proxy-Policy-deny-00001
insert_policyId_to_file1 deny_policyId ${policyId2}
Proxy-Policy-deny-00002
[Tags] cat
[Tags] cat右匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*villaday.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
@@ -50,7 +50,7 @@ Proxy-Policy-deny-00002
insert_policyId_to_file1 deny_policyId1 ${policyId2}
Proxy-Policy-deny-00003
[Tags] url
[Tags] url4种匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*wmtransfer.com,*banbaowang.com,*qidian.com,*rolandberger.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
@@ -75,7 +75,7 @@ Proxy-Policy-deny-00003
insert_policyId_to_file1 deny_policyId2 ${policyId2}
Proxy-Policy-deny-00004
[Tags] 请求头
[Tags] 请求头左匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*usdebtclock.org
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
@@ -100,7 +100,7 @@ Proxy-Policy-deny-00004
insert_policyId_to_file1 deny_policyId3 ${policyId2}
Proxy-Policy-deny-00005
[Tags] 请求头
[Tags] 请求头完整匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$americantesol.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
@@ -125,7 +125,7 @@ Proxy-Policy-deny-00005
insert_policyId_to_file1 deny_policyId4 ${policyId2}
Proxy-Policy-deny-00006
[Tags] 请求头
[Tags] 请求头字串匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.playgroundsessions.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
@@ -150,7 +150,7 @@ Proxy-Policy-deny-00006
insert_policyId_to_file1 deny_policyId5 ${policyId2}
Proxy-Policy-deny-00007
[Tags] 请求头
[Tags] 请求头右匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$peoplestalkradio.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
@@ -175,7 +175,7 @@ Proxy-Policy-deny-00007
insert_policyId_to_file1 deny_policyId6 ${policyId2}
Proxy-Policy-deny-00008
[Tags] 应答头
[Tags] 应答头右匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*6renyou.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
@@ -204,7 +204,7 @@ Proxy-Policy-deny-00008
insert_policyId_to_file1 deny_policyId7 ${policyId2}
Proxy-Policy-deny-00009
[Tags] 应答头
[Tags] 应答头完整匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*ljale.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
@@ -233,7 +233,7 @@ Proxy-Policy-deny-00009
insert_policyId_to_file1 deny_policyId8 ${policyId2}
Proxy-Policy-deny-00010
[Tags] 应答头
[Tags] 应答头字串匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*duckduckmoose.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
@@ -262,7 +262,7 @@ Proxy-Policy-deny-00010
insert_policyId_to_file1 deny_policyId9 ${policyId2}
Proxy-Policy-deny-00011
[Tags] 应答头
[Tags] 应答头左匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*tutcandy.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
@@ -291,7 +291,7 @@ Proxy-Policy-deny-00011
insert_policyId_to_file1 deny_policyId10 ${policyId2}
Proxy-Policy-deny-00012
[Tags] cookie
[Tags] cookie字串匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.youqulu.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
@@ -316,7 +316,7 @@ Proxy-Policy-deny-00012
insert_policyId_to_file1 deny_policyId11 ${policyId2}
Proxy-Policy-deny-00013
[Tags] set-cookie
[Tags] set-cookie4种匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.nypl.org,*thailand.com.co,*ke.com,$nationalbank.kz
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
@@ -341,7 +341,7 @@ Proxy-Policy-deny-00013
insert_policyId_to_file1 deny_policyId12 ${policyId2}
Proxy-Policy-deny-00014
[Tags] 请求体
[Tags] 请求体字串匹配
Comment 创建请求体
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=1234567
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
@@ -362,7 +362,7 @@ Proxy-Policy-deny-00014
insert_policyId_to_file1 deny_policyId13 ${policyId2}
Proxy-Policy-deny-00015
[Tags] 应答体
[Tags] 应答体字串匹配
Comment 创建应答体
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ASDFG
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
@@ -374,6 +374,35 @@ Proxy-Policy-deny-00015
insert_policyId_to_file1 deny_policyId14 ${policyId2}
Proxy-Policy-deny-00016
[Tags] Sub Objects层级
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.stewart.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*art.com/en.html
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
${addItemList} Create List ${objectId1}
${objectDict1} Create Dictionary objectType=url isValid=${1} subObjectIds=${addItemList}
${rescode} ${objectId2} AddObjects ${1} ${objectDict1}
Comment #创建引用文件
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
${profiledId} Get From Dictionary ${response} profileId
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建deny策略
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00003 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":404,"protocol":"HTTP"} filterList=${objectId2}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 deny_profileId6 ${profiledId}
insert_policyId_to_file1 deny_objectId47 ${objectId}
insert_policyId_to_file1 deny_objectId48 ${objectId1}
insert_policyId_to_file1 deny_objectId49 ${objectId2}
insert_policyId_to_file1 intercept_deny_policyId15 ${policyId1}
insert_policyId_to_file1 deny_policyId17 ${policyId2}
Proxy-Policy-deny-00017
[Tags] 最大组合1
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
@@ -401,7 +430,7 @@ Proxy-Policy-deny-00016
insert_policyId_to_file1 deny_objectId40 ${object_body_Id}
insert_policyId_to_file1 deny_policyId15 ${policyId2}
Proxy-Policy-deny-00017
Proxy-Policy-deny-00018
[Tags] 最大组合2
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.umusicpub.com
@@ -433,27 +462,3 @@ Proxy-Policy-deny-00017
insert_policyId_to_file1 deny_objectId45 ${object_body_Id}
insert_policyId_to_file1 intercept_deny_policyId14 ${policyId1}
insert_policyId_to_file1 deny_policyId16 ${policyId2}
Proxy-Policy-deny-00018
[Tags] Sub Objects
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$newsela.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${addItemList} Create List ${objectId}
${objectDict1} Create Dictionary objectType=url isValid=${1} subObjectIds=${addItemList}
${rescode} ${objectId1} AddObjects ${1} ${objectDict1}
log ${objectId1}
Comment #创建引用文件
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
${profiledId} Get From Dictionary ${response} profileId
#Comment Comment 创建拦截策略
#${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3
#log ${policyDict}
#${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建deny策略
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00003 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":404,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 deny_profileId1 ${profiledId}
insert_policyId_to_file1 deny_objectId2 ${objectId}
insert_policyId_to_file1 deny_policyId2 ${policyId2}