493 lines
42 KiB
Plaintext
493 lines
42 KiB
Plaintext
*** Settings ***
|
||
Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities
|
||
Library String
|
||
Library OperatingSystem
|
||
Library Selenium2Library
|
||
Library Collections
|
||
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
||
Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot
|
||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||
Library OperatingSystem
|
||
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||
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
|
||
Library json
|
||
Library DateTime
|
||
Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot
|
||
Library ../../../04-CustomLibrary/Library/VerifyPolicy.py
|
||
Resource ../../../05-Other/AllFlowCaseVariable.txt
|
||
|
||
*** Variables ***
|
||
${policyIds} ${EMPTY}
|
||
${objectids} ${EMPTY}
|
||
|
||
*** Test Cases ***
|
||
Proxy-Policy-deny-00002
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "kingidentity.com"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId1} ${deny_policyId1}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-deny-00003
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn1} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.wimdu.de"}
|
||
${fqdn2} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "creativetravelgroup.com"}
|
||
${fqdn3} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.hinabian.com"}
|
||
${fqdn4} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.smithsonianjourneys.org"}
|
||
${url1} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.wimdu.de/"}
|
||
${url2} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "creativetravelgroup.com/"}
|
||
${url3} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.hinabian.com/"}
|
||
${url4} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.smithsonianjourneys.org/"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn1} ${fqdn2} ${fqdn3} ${fqdn4} ${url1} ${url2} ${url3} ${url4}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId2} ${deny_objectId3} ${deny_policyId2}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-deny-00004
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "bbs.nga.cn"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "bbs.nga.cn/"}
|
||
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "afsfssfMozilla/5.0afsfsdafsafs","district": "User-Agent"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${req_hdr_ua} ${fqdn}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId48} ${deny_objectId49} ${deny_objectId50} ${deny_policyId3}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-deny-00005
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "americantesol.com"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "americantesol.com/tesol-register.html"}
|
||
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36","district": "User-Agent"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId7} ${deny_objectId8} ${deny_objectId9} ${deny_policyId4}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-deny-00006
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.playgroundsessions.com"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.playgroundsessions.com/about/software-features"}
|
||
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "AppleWebKit","district": "User-Agent"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId10} ${deny_objectId11} ${deny_objectId12} ${deny_policyId5}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-deny-00007
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "peoplestalkradio.com"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "peoplestalkradio.com/forums/register.php"}
|
||
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "hahahahsfeSafari/537.36","district": "User-Agent"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId13} ${deny_objectId14} ${deny_objectId15} ${deny_policyId6}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-deny-00008
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "bbs.tianya.cn"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "bbs.tianya.cn/list-16-1.shtml"}
|
||
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId51} ${deny_objectId52} ${deny_objectId53} ${deny_policyId7}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-deny-00009
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.cuctv.com"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.cuctv.com/"}
|
||
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "text/html; charset=utf-8","district": "Content-Type"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId20} ${deny_objectId21} ${deny_policyId8}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-deny-000010
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.duckduckmoose.com"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.duckduckmoose.com/"}
|
||
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId22} ${deny_objectId23} ${deny_objectId24} ${deny_policyId9}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-deny-000011
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "tutcandy.com"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "tutcandy.com/2009/04/ai-sketch-to-vector-tutorial"}
|
||
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId25} ${deny_objectId26} ${deny_objectId27} ${deny_policyId10}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-deny-000012
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.youqulu.com"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.youqulu.com/category/zixun"}
|
||
${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "saltkeyfafghlh","district": "Cookie"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId28} ${deny_objectId29} ${deny_objectId30} ${deny_policyId11}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-deny-000013
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn1} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.nypl.org"}
|
||
${fqdn2} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.thailand.com.co"}
|
||
${fqdn3} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "bj.zu.ke.com"}
|
||
${fqdn4} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "nationalbank.kz"}
|
||
${url1} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.nypl.org/books-music-movies"}
|
||
${url2} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.thailand.com.co/category-207-b0.html"}
|
||
${url3} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "bj.zu.ke.com/zufang"}
|
||
${url4} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "nationalbank.kz/?switch=kazakh"}
|
||
${res_hdr_sc1} Create Dictionary attributeType=signature attributeName=res_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "incap_sesafss23456","district": "Set-Cookie"}
|
||
${res_hdr_sc2} Create Dictionary attributeType=signature attributeName=res_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "1111ssssMax-Age=604800","district": "Set-Cookie"}
|
||
${res_hdr_sc3} Create Dictionary attributeType=signature attributeName=res_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "domain=.ke.com","district": "Set-Cookie"}
|
||
${res_hdr_sc4} Create Dictionary attributeType=signature attributeName=res_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "irkzadmin_sessionfsf22345","district": "Set-Cookie"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn1} ${fqdn2} ${fqdn3} ${fqdn4} ${url1} ${url2} ${url3} ${url4}
|
||
... ${res_hdr_sc1} ${res_hdr_sc2} ${res_hdr_sc3} ${res_hdr_sc4}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId31} ${deny_objectId32} ${deny_objectId46}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-deny-000014
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "open.node.com:180"}
|
||
${req_body} Create Dictionary attributeType=string attributeName=req_body appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "ProxydenyTest001402"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${req_body}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId34} ${deny_objectId54} ${deny_policyId13}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-deny-000015
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${res_body} Create Dictionary attributeType=string attributeName=res_body appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "Proxydeny001502"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${res_body}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId55} ${deny_policyId14}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-deny-000016
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "mt.meipai.com"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "mt.meipai.com/"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId58} ${deny_objectId47} ${deny_policyId17}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
Proxy-Policy-deny-000018
|
||
#新增策略验证
|
||
#创建attributes中的字典
|
||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.umusicpub.com"}
|
||
${url} Create Dictionary attributeType=string attributeName=url appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "www.umusicpub.com/au/"}
|
||
${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "timezoneoffset","district": "Cookie"}
|
||
${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "Domain=.umusicpub.com","district": "Set-Cookie"}
|
||
${res_body} Create Dictionary attributeType=string attributeName=res_body appId=${HTTP_VID} appName=http protocol=http attributeValue={"string": "NOFOLLOW"}
|
||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "${HTTP_VID}"}
|
||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||
# 合成attributes字典集
|
||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} ${res_hdr_sc} ${res_body}
|
||
${verifySession} Create Dictionary attributes=${attributes}
|
||
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
||
log ${verifyList}
|
||
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||
# 打印检查结果
|
||
${objectid_verify} Set Variable ${testClentIpId}
|
||
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId41} ${deny_objectId42} ${deny_objectId43} ${deny_objectId44} ${deny_objectId45} ${deny_policyId16}
|
||
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||
log ${objectid_verify}
|
||
${testType} Evaluate type($objectid_verify)
|
||
${testType} Evaluate type($resData)
|
||
log ${resData}
|
||
sleep 5
|
||
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||
Should Be Equal As Strings ${ok} true
|
||
|
||
|