This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dongxiaoyan-tsg-autotest/01-TestCase/tsg_adc/multi_step/c_Allow_Tests.robot

201 lines
12 KiB
Plaintext

*** Settings ***
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
Force Tags tsg_adc_wp adc_log proxy_policy
Library OperatingSystem
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
Resource ../../../05-Other/AllFlowCaseVariable.txt
Resource ../../../02-Keyword/tsg_adc/FileOperation.robot
Resource ../../../05-Other/AllFlowCaseVariable1.txt
*** Variables ***
${policyIds} ${EMPTY}
${objectids} ${EMPTY}
*** Test Cases ***
Proxy-Policy-allow-00001
[Tags] fqdn
#删除对象
${objectids} set Variable ${allow_objectId}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId}
GetLogList proxy_event_log ${allow_starttime} ${allow_endtime} ${testClentIP} ${s} http_host mp.pipix.com
Proxy-Policy-allow-00002
[Tags] cat
#删除对象
${objectids} set Variable ${allow_objectId1}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId1}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId1}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId1}
GetLogList proxy_event_log ${allow_starttime1} ${allow_endtime1} ${testClentIP} ${s} http_host feishu.cn
Proxy-Policy-allow-00003
[Tags] url
#删除对象
${objectids} set Variable ${allow_objectId2}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId3}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId2}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId2}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId2}
GetLogList proxy_event_log ${allow_starttime2} ${allow_endtime2} ${testClentIP} ${s} http_host smzdm.com
GetLogList proxy_event_log ${allow_starttime3} ${allow_endtime3} ${testClentIP} ${s} http_host bilibili.com
GetLogList proxy_event_log ${allow_starttime4} ${allow_endtime4} ${testClentIP} ${s} http_host cheapair.com
GetLogList proxy_event_log ${allow_starttime5} ${allow_endtime5} ${testClentIP} ${s} http_host surfline.com
Proxy-Policy-allow-00004
[Tags] 请求头
#删除对象
${objectids} set Variable ${allow_objectId4}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId5}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId6}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId3}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId3}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId3}
GetLogList proxy_event_log ${allow_starttime6} ${allow_endtime6} ${testClentIP} ${s} http_host expeditionportal.com
Proxy-Policy-allow-00005
[Tags] 请求头
#删除对象
${objectids} set Variable ${allow_objectId7}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId8}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId9}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId4}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId4}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId4}
GetLogList proxy_event_log ${allow_starttime7} ${allow_endtime7} ${testClentIP} ${s} http_host boutiquehotel.me
Proxy-Policy-allow-00006
[Tags] 请求头
#删除对象
${objectids} set Variable ${allow_objectId10}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId11}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId12}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId5}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId5}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId5}
GetLogList proxy_event_log ${allow_starttime8} ${allow_endtime8} ${testClentIP} ${s} http_host www.choicehotels.com
Proxy-Policy-allow-00007
[Tags] 请求头
#删除对象
${objectids} set Variable ${allow_objectId13}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId14}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId15}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId6}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId6}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId6}
GetLogList proxy_event_log ${allow_starttime9} ${allow_endtime9} ${testClentIP} ${s} http_host www.clubmed.us
Proxy-Policy-allow-00008
[Tags] 应答头
#删除对象
${objectids} set Variable ${allow_objectId16}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId17}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId18}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId7}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId7}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId7}
GetLogList proxy_event_log ${allow_starttime10} ${allow_endtime10} ${testClentIP} ${s} http_host sse.com.cn
Proxy-Policy-allow-00009
[Tags] 应答头
#删除对象
${objectids} set Variable ${allow_objectId19}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId20}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId21}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId8}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId8}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId8}
GetLogList proxy_event_log ${allow_starttime11} ${allow_endtime11} ${testClentIP} ${s} http_host szse.cn
Proxy-Policy-allow-00010
[Tags] 应答头
#删除对象
${objectids} set Variable ${allow_objectId22}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId23}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId24}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId9}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId9}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId9}
GetLogList proxy_event_log ${allow_starttime12} ${allow_endtime12} ${testClentIP} ${s} http_host gf.com.cn
Proxy-Policy-allow-00011
[Tags] 应答头
#删除对象
${objectids} set Variable ${allow_objectId25}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId26}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId27}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId10}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId10}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId10}
GetLogList proxy_event_log ${allow_starttime13} ${allow_endtime13} ${testClentIP} ${s} http_host chinastock.com.cn
Proxy-Policy-allow-00012
[Tags] cookie
#删除对象
${objectids} set Variable ${allow_objectId28}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId29}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId30}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId11}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId11}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId11}
GetLogList proxy_event_log ${allow_starttime14} ${allow_endtime14} ${testClentIP} ${s} http_host www.virtuoso.com
Proxy-Policy-allow-00013
[Tags] set-cookie
#删除对象
${objectids} set Variable ${allow_objectId31}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId32}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId12}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId12}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId12}
GetLogList proxy_event_log ${allow_starttime15} ${allow_endtime15} ${testClentIP} ${s} http_host russia.payu.com
GetLogList proxy_event_log ${allow_starttime16} ${allow_endtime16} ${testClentIP} ${s} http_host tytbz.925mm.com
GetLogList proxy_event_log ${allow_starttime17} ${allow_endtime17} ${testClentIP} ${s} http_host dujia.qunar.com
GetLogList proxy_event_log ${allow_starttime18} ${allow_endtime18} ${testClentIP} ${s} http_host www.vitalsource.com
Proxy-Policy-allow-00014
[Tags] 最大组合
#删除对象
${objectids} set Variable ${allow_objectId33}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId34}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId35}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId36}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId37}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_objectId38}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_allow_policyId13}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${allow_policyId13}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId13}
GetLogList proxy_event_log ${allow_starttime19} ${allow_endtime19} ${testClentIP} ${s} http_host www.orbitz.com