1、修改重定向不同操作系统使用文件;
2、添加测试时默认添加测试机IP或subid;
This commit is contained in:
@@ -187,7 +187,7 @@ ProxyPolicy-Redirect-ssl-00007
|
|||||||
#${commandstr} set variable ${curlbatpath}/ProxyPolicy_Redirect_ssl00007.bat
|
#${commandstr} set variable ${curlbatpath}/ProxyPolicy_Redirect_ssl00007.bat
|
||||||
#${commandstr} set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' https://www.gamersky.com/news/
|
#${commandstr} set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' https://www.gamersky.com/news/
|
||||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/ProxyPolicy_Redirect_ssl00007.bat
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/ProxyPolicy_Redirect_ssl00007.bat
|
||||||
... ELSE set variable ${curlbatpath}/ProxyPolicy_Redirect_ssl00007.bat
|
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' https://www.gamersky.com/news/
|
||||||
${stringlist} Create List Tango Secure Gateway CA Host: www.gamersky.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 301 Moved Permanently Location: http://video.cnfol.com/wptzj/
|
${stringlist} Create List Tango Secure Gateway CA Host: www.gamersky.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 301 Moved Permanently Location: http://video.cnfol.com/wptzj/
|
||||||
${starttime} Get Time
|
${starttime} Get Time
|
||||||
Sleep ${policyVerificationSleepSeconds}s
|
Sleep ${policyVerificationSleepSeconds}s
|
||||||
|
|||||||
@@ -50,13 +50,14 @@ SelfServerSecurityPolicy-Deny-AllProtol-00001
|
|||||||
... policyDesc=${Default_PolicyDesc}
|
... policyDesc=${Default_PolicyDesc}
|
||||||
... action=deny
|
... action=deny
|
||||||
... effectiveRange=${Default_EffectiveRange}
|
... effectiveRange=${Default_EffectiveRange}
|
||||||
... userRegion=${Default_UserRegion}
|
... userRegion=method:rst
|
||||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR
|
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR
|
||||||
... isValid=${Default_IsValid}
|
... isValid=${Default_IsValid}
|
||||||
... appObjectIdArray=${Default_AppObjectIdArray}
|
... appObjectIdArray=${Default_AppObjectIdArray}
|
||||||
... userTags=${Default_UserTags}
|
... userTags=${Default_UserTags}
|
||||||
... doLog=${Default_DoLog}
|
... doLog=${Default_DoLog}
|
||||||
... scheduleId=${Default_ScheduleId}
|
... scheduleId=${Default_ScheduleId}
|
||||||
|
#默认客户端条件类型:clientip or clientsubid ${Default_Client_Type}
|
||||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||||
${s} Convert to String ${policyId}
|
${s} Convert to String ${policyId}
|
||||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||||
|
|||||||
@@ -167,4 +167,6 @@ DeletePolicyAndObject
|
|||||||
log todeleteobj_DeletePolicyAndObject
|
log todeleteobj_DeletePolicyAndObject
|
||||||
DeleteObject ${objectids}
|
DeleteObject ${objectids}
|
||||||
|
|
||||||
|
DeleteAfterCase
|
||||||
|
[Arguments] ${policyids} ${objectids}
|
||||||
|
Run Keyword If '${testPart}'=='all' or '${testPart}'=='3' DeletePolicyAndObject ${policyids} ${objectids}
|
||||||
|
|||||||
@@ -183,8 +183,14 @@ AnalysisUserRegion
|
|||||||
ManageReferenceObject
|
ManageReferenceObject
|
||||||
# 处理引用对象字符串
|
# 处理引用对象字符串
|
||||||
[Arguments] ${policyList}
|
[Arguments] ${policyList}
|
||||||
${emptyList} Create List
|
${emptyList} Create List
|
||||||
Run Keyword If '${addTestClentIPFlag}'=='1' ManageClientObject ${emptyList}
|
#默认客户端条件类型:clientip or clientsubid
|
||||||
|
${return} ${defaultClient} Run Keyword And Ignore Error Set Variable ${policyList}[defalutClient]
|
||||||
|
${defaultClient} Run Keyword If "${return}"=="FAIL" or "${defaultClient}"=="${EMPTY}" Set Variable ${Default_Client_Type}
|
||||||
|
... ELSE Set Variable ${defaultClient}
|
||||||
|
Run Keyword If '${addTestClentIPFlag}'=='1' and '${defaultClient}'=='clientip' ManageClientIPObject ${emptyList}
|
||||||
|
Run Keyword If '${addTestClentIPFlag}'=='1' and '${defaultClient}'=='clientsubid' ManageClientSubIDObject ${emptyList}
|
||||||
|
#Run Keyword If '${addTestClentIPFlag}'=='1' ManageClientObject ${emptyList}
|
||||||
# Run Keyword If "${clientHostObj}"!="${None}" Append To List ${emptyList} ${clientHostObj}
|
# Run Keyword If "${clientHostObj}"!="${None}" Append To List ${emptyList} ${clientHostObj}
|
||||||
|
|
||||||
${defaultObj} Create Dictionary
|
${defaultObj} Create Dictionary
|
||||||
@@ -199,7 +205,7 @@ ManageReferenceObject
|
|||||||
END
|
END
|
||||||
Set To Dictionary ${policyList} referenceObject=${emptyList}
|
Set To Dictionary ${policyList} referenceObject=${emptyList}
|
||||||
|
|
||||||
ManageClientObject
|
ManageClientIPObject
|
||||||
[Arguments] ${emptyList}
|
[Arguments] ${emptyList}
|
||||||
# 增加引用测试终端IP策略对象
|
# 增加引用测试终端IP策略对象
|
||||||
${list1} Create List TSG_SECURITY_SOURCE_ADDR
|
${list1} Create List TSG_SECURITY_SOURCE_ADDR
|
||||||
@@ -208,7 +214,12 @@ ManageClientObject
|
|||||||
# ${list2} Create List null
|
# ${list2} Create List null
|
||||||
# ${obj2} Create Dictionary objectId=${testClentSubID} protocolFields=${list2}
|
# ${obj2} Create Dictionary objectId=${testClentSubID} protocolFields=${list2}
|
||||||
# Append To List ${emptyList} ${obj2}
|
# Append To List ${emptyList} ${obj2}
|
||||||
|
ManageClientSubIDObject
|
||||||
|
[Arguments] ${emptyList}
|
||||||
|
# 增加引用测试终端IP策略对象
|
||||||
|
${list1} Create List
|
||||||
|
${obj1} Create Dictionary objectId=${testClentSubID} protocolFields=${list1}
|
||||||
|
Append To List ${emptyList} ${obj1}
|
||||||
|
|
||||||
AnalysisReferenceObject
|
AnalysisReferenceObject
|
||||||
# 解析引用对象
|
# 解析引用对象
|
||||||
|
|||||||
@@ -35,4 +35,6 @@ ${Default_AddItem_IsHexbin} ${0}
|
|||||||
${Default_AddItem_IsInitialize} ${0}
|
${Default_AddItem_IsInitialize} ${0}
|
||||||
${Default_AddItem_ItemName} ${EMPTY}
|
${Default_AddItem_ItemName} ${EMPTY}
|
||||||
${Default_AddItem_ItemDesc} ${EMPTY}
|
${Default_AddItem_ItemDesc} ${EMPTY}
|
||||||
|
#默认客户端条件类型:clientip or clientsubid
|
||||||
|
${Default_Client_Type} clientip
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user