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/b_Allow_Ssl_Tests.robot
2021-05-17 13:24:29 +06:00

70 lines
4.8 KiB
Plaintext

*** Settings ***
Force Tags tsg_adc_wp security_policy adc_verify
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_adc/FileOperation.robot
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
# Resource ../../../03-Variable/ApplicationID.txt
Resource ../../../05-Other/AllFlowCaseVariable.txt
*** Test Cases ***
SecurityPolicy-Allow-Ssl-00001
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_SSL_00001.bat
... ELSE set variable curl https://homebank.kz/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Переводы
... ELSE Create List Переводы
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变Allow策略
${policyDict} Create Dictionary policyId=${allow_ssl_policyId} source=${allow_ssl_objectId2}|TSG_SECURITY_SOURCE_LOCATION policyName=SecurityPolicy-Allow-Ssl-00001 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SSL"} filterList=${allow_ssl_objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 5
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_SSL_00001.bat
... ELSE set variable curl https://homebank.kz/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Переводы
... ELSE Create List Переводы
${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Allow-Ssl-00002
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_SSL_00002.bat
... ELSE set variable curl -kv https://protonmail.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Secure email
... ELSE Create List Secure email
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变Allow策略
${policyDict} Create Dictionary policyId=${allow_ssl_policyId1} policyName=SecurityPolicy-Allow-Ssl-00002-1 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SSL"} filterList=${allow_ssl_objectId3}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 5
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_SSL_00002_1.bat
... ELSE set variable curl -kv https://xinyue.qq.com/#/
${stringlist} run keyword if '${systemType}'=='Windows' Create List 心悦
... ELSE Create List 心悦
${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Allow-Ssl-00003
Comment 开启allow策略
${policyDict} Create Dictionary policyId=${allow_ssl_policyId2} policyName=SecurityPolicy-Allow-Ssl-00003-1 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SSL"} isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep ${policyModifySleepSeconds}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_SSL_00002.bat
... ELSE set variable curl -kv https://protonmail.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Secure email
... ELSE Create List Secure email
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 关闭allow策略
${policyDict} Create Dictionary policyId=${allow_ssl_policyId2} policyName=SecurityPolicy-Allow-Ssl-00003-2 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SSL"} isValid=${0} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep ${policyModifySleepSeconds}