获取本机ip存在问题先使用设置;用例核查日志用错策略id调整,策略验证内容不存在,调整为一定存在内容
This commit is contained in:
@@ -8,7 +8,6 @@ Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||
|
||||
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
@@ -49,7 +48,6 @@ ProxyPolicy-Allow-Http-00001
|
||||
log ${addPolicyStr}
|
||||
${rescode} ${policyId2} AddPolicy ${addPolicyStr}
|
||||
log ${policyId2}
|
||||
${policyId2log} set variable ${policyId2}
|
||||
${policyIds2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId2}]}
|
||||
${policyIds} Create List ${policyId1} ${policyIds2}
|
||||
#创建管控策略
|
||||
@@ -63,11 +61,11 @@ ProxyPolicy-Allow-Http-00001
|
||||
#功能端验证
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${commandreturn} OperatingSystem.Run curl -I \ -m \ 10 \ -o \ /dev/null \ -s \ -w \ \ \%{http_code} \ \ http://www.icbc.com.cn
|
||||
should contain ${commandreturn} 200
|
||||
should contain ${commandreturn} 000
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId2log}
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host icbc
|
||||
|
||||
ProxyPolicy-allow-http-00002
|
||||
@@ -116,7 +114,7 @@ ProxyPolicy-allow-http-00002
|
||||
${policyIds} Create List ${policyId1} ${policyId5}
|
||||
#功能端验证
|
||||
${commandstr} set variable ${curlbatpath}/ProxyPolicy_hijack_http00002.bat
|
||||
${stringlist} Create List 今日关注
|
||||
${stringlist} Create List 美国中文网
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
@@ -178,7 +176,6 @@ ProxyPolicy-allow-http-00003
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host xiaozhu.com
|
||||
|
||||
|
||||
ProxyPolicy-allow-http-00005
|
||||
[Tags] allow http fqdn+url
|
||||
#创建fqdn
|
||||
@@ -268,7 +265,7 @@ roxyPolicy-allow-http-00008
|
||||
${policyIds} Create List ${policyId1} ${policyId5}
|
||||
#功能端验证
|
||||
${commandstr} set variable ${curlbatpath}/ProxyPolicy_allow_ssl00008
|
||||
${stringlist} Create List 今日关注
|
||||
${stringlist} Create List 美国中文网
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
@@ -292,7 +289,6 @@ ProxyPolicy-Allow-Http-00009
|
||||
log ${object_URL_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_URL_Id}
|
||||
#${objectids} set Variable ${object_FQDN_Id},${object_URL_Id}
|
||||
|
||||
#${objectids} set Variable ${object_FQDN_Id},${object_URL_Id},${object_UA_Id}
|
||||
#${objectids} set Variable ${object_FQDN_Id},${object_URL_Id},${object_UA_Id},${object_SC_Id}
|
||||
Comment 创建 拦截策略
|
||||
@@ -306,7 +302,6 @@ ProxyPolicy-Allow-Http-00009
|
||||
log ${addPolicyStr}
|
||||
${rescode} ${policyId2} AddPolicy ${addPolicyStr}
|
||||
log ${policyId2}
|
||||
${policyId2log} set variable ${policyId2}
|
||||
${policyIds2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId2}]}
|
||||
${policyIds} Create List ${policyId1} ${policyIds2}
|
||||
Comment 创建管控策略
|
||||
@@ -324,5 +319,5 @@ ProxyPolicy-Allow-Http-00009
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId2log}
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
@@ -2,7 +2,6 @@
|
||||
Resource ../../03-Variable/BifangApiVariable.txt
|
||||
Library REST http://${host}:${port}
|
||||
Library Collections
|
||||
Library ExtensionLibrary
|
||||
Resource ../tsg_bfapi/LoginLogout.robot
|
||||
Resource ../tsg_ui/Logout/Logout.robot
|
||||
Resource ../tsg_ui/Login/Login.robot
|
||||
@@ -10,9 +9,8 @@ Resource ../tsg_ui/Login/Login.robot
|
||||
*** Keywords ***
|
||||
LoginAndAddLocalIP
|
||||
# 获取主机IP
|
||||
${ip} Get Host IP
|
||||
Set Global Variable ${testClentIP} ${ip}
|
||||
|
||||
#${ip} Get Host IP
|
||||
#Set Global Variable ${testClentIP} ${ip}
|
||||
Run Keyword If '${loginType}' == 'api' ApiLoginAndAddLocalIP aa
|
||||
... ELSE IF '${loginType}' == 'cli' CliLogin
|
||||
... ELSE UiLoginAndAaddLocalIP bb
|
||||
|
||||
Reference in New Issue
Block a user