Settings
This commit is contained in:
50
01-TestCase/tsg_bfapi/setting/ClearAllPolicy.robot
Normal file
50
01-TestCase/tsg_bfapi/setting/ClearAllPolicy.robot
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Force Tags tsg_bf_api Clear_All_Policys
|
||||||
|
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
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${url1} /policy/profile/keyringobj
|
||||||
|
${url2} /policy/profile/trustedcacertobj
|
||||||
|
${url3} /policy/profile/responsepages
|
||||||
|
${url4} /policy/profile/hijackfiles
|
||||||
|
${url5} /policy/profile/insertscripts
|
||||||
|
${url6} /policy/profile/trafficmirror
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Keyring Policy delete all case
|
||||||
|
# 清空所有策略!!!
|
||||||
|
${reqData} Create Dictionary isClear=true
|
||||||
|
DeletePolicyFile ${url1} ${reqData}
|
||||||
|
|
||||||
|
Trusted Cert Policy delete all case
|
||||||
|
# 清空所有策略!!!
|
||||||
|
${reqData} Create Dictionary isClear=true
|
||||||
|
DeletePolicyFile ${url2} ${reqData}
|
||||||
|
|
||||||
|
Response Pages Policy delete all case
|
||||||
|
# 清空所有策略!!!
|
||||||
|
${reqData} Create Dictionary isClear=true
|
||||||
|
DeletePolicyFile ${url3} ${reqData}
|
||||||
|
|
||||||
|
Hijack Files Policy delete all case
|
||||||
|
# 清空所有策略!!!
|
||||||
|
${reqData} Create Dictionary isClear=true
|
||||||
|
DeletePolicyFile ${url4} ${reqData}
|
||||||
|
|
||||||
|
Insert Scripts Policy delete all case
|
||||||
|
# 清空所有策略!!!
|
||||||
|
${reqData} Create Dictionary isClear=true
|
||||||
|
DeletePolicyFile ${url5} ${reqData}
|
||||||
|
|
||||||
|
Traffic Mirror Policy delete all case
|
||||||
|
# 清空所有策略!!!
|
||||||
|
${reqData} Create Dictionary isClear=true
|
||||||
|
DeletePolicyFile ${url6} ${reqData}
|
||||||
|
|
||||||
|
|
||||||
248
01-TestCase/tsg_bfapi/setting/Decryption_Profile.robot
Normal file
248
01-TestCase/tsg_bfapi/setting/Decryption_Profile.robot
Normal file
@@ -0,0 +1,248 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||||
|
Force Tags tsg_bf_api Response_Pages
|
||||||
|
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
|
||||||
|
Library Custometest
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${url} /policy/profile/decryption
|
||||||
|
${profileId} ${EMPTY}
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Decryption_Profile-00001
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
Decryption_Profile-00002
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest cn=1
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
Decryption_Profile-00003
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest issuer=1
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
Decryption_Profile-00004
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest self-signed=1
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
Decryption_Profile-00005
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest expiration=1
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
Decryption_Profile-00006
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest fail_action=pass-through
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
Decryption_Profile-00007
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest ev_cert=1
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
Decryption_Profile-00008
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest cert_transparency=1
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
Decryption_Profile-00009
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest mutual_authentication=1
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
Decryption_Profile-00010
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest cert_pinning=1
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
Decryption_Profile-00011
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest protocol_errors=1
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
Decryption_Profile-00012
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest trusted_root_cert_is_not_installed_on_client=1
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
Decryption_Profile-00013
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest allow_http2=0
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
Decryption_Profile-00014
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${protocol_version} Create Dictionary min=ssl3 max=tls13 mirror_client=1 allow_http2=1
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest protocol_version=${protocol_version}
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
163
01-TestCase/tsg_bfapi/setting/Dnsrecords.robot
Normal file
163
01-TestCase/tsg_bfapi/setting/Dnsrecords.robot
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||||
|
Force Tags tsg_adc Security_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 ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||||
|
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||||
|
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||||
|
Library Custometest
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${url} /policy/profile/dnsrecords
|
||||||
|
${profileId} ${EMPTY}
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Dnsrecords_A_-00001
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${Dict1} Create Dictionary value=192.168.0.1
|
||||||
|
${Dict2} Create Dictionary value=192.168.0.2
|
||||||
|
${list} Create List ${Dict1} ${Dict2}
|
||||||
|
${objectedit} Create Dictionary recordName=12 recordType=A recordValues=${list}
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_dnsrecords} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} Post-Request ${url} ${objectDict}
|
||||||
|
#查询
|
||||||
|
${profileId} Set Variable ${response['data']['list'][0]["recordId"]}
|
||||||
|
${profileName} Set Variable ${response['data']['list'][0]["recordName"]}
|
||||||
|
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||||
|
# 修改
|
||||||
|
log ${profileId}
|
||||||
|
${reqHeader_edit} Set Variable { \ \ \ \ "opAction": "update", \ \ \ \ "returnData": 1, \ \ \ \ "dnsRecordList": [ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "recordId": 1, \ \ \ \ \ \ \ \ \ \ \ \ "recordName": "12", \ \ \ \ \ \ \ \ \ \ \ \ "recordType": "A", \ \ \ \ \ \ \ \ \ \ \ \ "recordValues": [ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.1" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.2" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "isValid": 1, \ \ \ \ \ \ \ \ \ \ \ \ "profileDesc": "" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||||
|
${aaa} Evaluate type(${reqHeader_edit} )
|
||||||
|
log ${aaa}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||||
|
|
||||||
|
Dnsrecords_MX_-00002
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${Dict1} Create Dictionary value=abc.com priority=10
|
||||||
|
${Dict2} Create Dictionary value=edf.com priority=12
|
||||||
|
${list} Create List ${Dict1} ${Dict2}
|
||||||
|
${objectedit} Create Dictionary recordName=12 recordType=MX recordValues=${list}
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_dnsrecords} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} Post-Request ${url} ${objectDict}
|
||||||
|
#查询
|
||||||
|
${profileId} Set Variable ${response['data']['list'][0]["recordId"]}
|
||||||
|
${profileName} Set Variable ${response['data']['list'][0]["recordName"]}
|
||||||
|
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||||
|
# 修改
|
||||||
|
log ${profileId}
|
||||||
|
${reqHeader_edit} Set Variable { \ \ \ \ "opAction": "update", \ \ \ \ "returnData": 1, \ \ \ \ "dnsRecordList": [ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "recordId": ${profileId}, \ \ \ \ \ \ \ \ \ \ \ \ "recordName": "12", \ \ \ \ \ \ \ \ \ \ \ \ "recordType": "A", \ \ \ \ \ \ \ \ \ \ \ \ "recordValues": [ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.1" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.2" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "isValid": 1, \ \ \ \ \ \ \ \ \ \ \ \ "profileDesc": "" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||||
|
${aaa} Evaluate type(${reqHeader_edit} )
|
||||||
|
log ${aaa}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||||
|
|
||||||
|
Dnsrecords_CNAME_-00003
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${Dict1} Create Dictionary value=abc.com
|
||||||
|
${Dict2} Create Dictionary value=edf.com
|
||||||
|
${list} Create List ${Dict1} ${Dict2}
|
||||||
|
${objectedit} Create Dictionary recordName=12 recordType=CNAME recordValues=${list}
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_dnsrecords} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} Post-Request ${url} ${objectDict}
|
||||||
|
#查询
|
||||||
|
${profileId} Set Variable ${response['data']['list'][0]["recordId"]}
|
||||||
|
${profileName} Set Variable ${response['data']['list'][0]["recordName"]}
|
||||||
|
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||||
|
# 修改
|
||||||
|
log ${profileId}
|
||||||
|
${reqHeader_edit} Set Variable { \ \ \ \ "opAction": "update", \ \ \ \ "returnData": 1, \ \ \ \ "dnsRecordList": [ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "recordId": ${profileId}, \ \ \ \ \ \ \ \ \ \ \ \ "recordName": "12", \ \ \ \ \ \ \ \ \ \ \ \ "recordType": "A", \ \ \ \ \ \ \ \ \ \ \ \ "recordValues": [ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.1" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.2" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "isValid": 1, \ \ \ \ \ \ \ \ \ \ \ \ "profileDesc": "" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||||
|
${aaa} Evaluate type(${reqHeader_edit} )
|
||||||
|
log ${aaa}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||||
|
|
||||||
|
Dnsrecords_AAAA_-00004
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${Dict1} Create Dictionary value=2000:db8:2de::e13
|
||||||
|
${Dict2} Create Dictionary value=2000:db8:2de::e13
|
||||||
|
${list} Create List ${Dict1} ${Dict2}
|
||||||
|
${objectedit} Create Dictionary recordName=12 recordType=AAAA recordValues=${list}
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_dnsrecords} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} Post-Request ${url} ${objectDict}
|
||||||
|
#查询
|
||||||
|
${profileId} Set Variable ${response['data']['list'][0]["recordId"]}
|
||||||
|
${profileName} Set Variable ${response['data']['list'][0]["recordName"]}
|
||||||
|
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||||
|
# 修改
|
||||||
|
log ${profileId}
|
||||||
|
${reqHeader_edit} Set Variable { \ \ \ \ "opAction": "update", \ \ \ \ "returnData": 1, \ \ \ \ "dnsRecordList": [ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "recordId": ${profileId}, \ \ \ \ \ \ \ \ \ \ \ \ "recordName": "12", \ \ \ \ \ \ \ \ \ \ \ \ "recordType": "A", \ \ \ \ \ \ \ \ \ \ \ \ "recordValues": [ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.1" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.2" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "isValid": 1, \ \ \ \ \ \ \ \ \ \ \ \ "profileDesc": "" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||||
|
${aaa} Evaluate type(${reqHeader_edit} )
|
||||||
|
log ${aaa}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||||
|
|
||||||
|
Dnsrecords_TXT_-00005
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${Dict1} Create Dictionary value=abc.com
|
||||||
|
${Dict2} Create Dictionary value=edf.com
|
||||||
|
${list} Create List ${Dict1} ${Dict2}
|
||||||
|
${objectedit} Create Dictionary recordName=12 recordType=CNAME recordValues=${list}
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_dnsrecords} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} Post-Request ${url} ${objectDict}
|
||||||
|
#查询
|
||||||
|
${profileId} Set Variable ${response['data']['list'][0]["recordId"]}
|
||||||
|
${profileName} Set Variable ${response['data']['list'][0]["recordName"]}
|
||||||
|
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||||
|
# 修改
|
||||||
|
log ${profileId}
|
||||||
|
${reqHeader_edit} Set Variable { \ \ \ \ "opAction": "update", \ \ \ \ "returnData": 1, \ \ \ \ "dnsRecordList": [ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "recordId": ${profileId}, \ \ \ \ \ \ \ \ \ \ \ \ "recordName": "12", \ \ \ \ \ \ \ \ \ \ \ \ "recordType": "A", \ \ \ \ \ \ \ \ \ \ \ \ "recordValues": [ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.1" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.2" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "isValid": 1, \ \ \ \ \ \ \ \ \ \ \ \ "profileDesc": "" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||||
|
${aaa} Evaluate type(${reqHeader_edit} )
|
||||||
|
log ${aaa}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||||
|
|
||||||
|
Dnsrecords_NS_-00006
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${Dict1} Create Dictionary value=abc.com
|
||||||
|
${Dict2} Create Dictionary value=edf.com
|
||||||
|
${list} Create List ${Dict1} ${Dict2}
|
||||||
|
${objectedit} Create Dictionary recordName=12 recordType=CNAME recordValues=${list}
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_dnsrecords} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} Post-Request ${url} ${objectDict}
|
||||||
|
#查询
|
||||||
|
${profileId} Set Variable ${response['data']['list'][0]["recordId"]}
|
||||||
|
${profileName} Set Variable ${response['data']['list'][0]["recordName"]}
|
||||||
|
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||||
|
# 修改
|
||||||
|
log ${profileId}
|
||||||
|
${reqHeader_edit} Set Variable { \ \ \ \ "opAction": "update", \ \ \ \ "returnData": 1, \ \ \ \ "dnsRecordList": [ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "recordId": ${profileId}, \ \ \ \ \ \ \ \ \ \ \ \ "recordName": "12", \ \ \ \ \ \ \ \ \ \ \ \ "recordType": "A", \ \ \ \ \ \ \ \ \ \ \ \ "recordValues": [ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.1" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.2" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "isValid": 1, \ \ \ \ \ \ \ \ \ \ \ \ "profileDesc": "" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||||
|
${aaa} Evaluate type(${reqHeader_edit} )
|
||||||
|
log ${aaa}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||||
|
|
||||||
|
Dnsrecords_PTR_-00007
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${Dict1} Create Dictionary value=abc.com
|
||||||
|
${Dict2} Create Dictionary value=edf.com
|
||||||
|
${list} Create List ${Dict1} ${Dict2}
|
||||||
|
${objectedit} Create Dictionary recordName=12 recordType=CNAME recordValues=${list}
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_dnsrecords} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} Post-Request ${url} ${objectDict}
|
||||||
|
#查询
|
||||||
|
${profileId} Set Variable ${response['data']['list'][0]["recordId"]}
|
||||||
|
${profileName} Set Variable ${response['data']['list'][0]["recordName"]}
|
||||||
|
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||||
|
# 修改
|
||||||
|
log ${profileId}
|
||||||
|
${reqHeader_edit} Set Variable { \ \ \ \ "opAction": "update", \ \ \ \ "returnData": 1, \ \ \ \ "dnsRecordList": [ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "recordId": ${profileId}, \ \ \ \ \ \ \ \ \ \ \ \ "recordName": "12", \ \ \ \ \ \ \ \ \ \ \ \ "recordType": "A", \ \ \ \ \ \ \ \ \ \ \ \ "recordValues": [ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.1" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.2" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "isValid": 1, \ \ \ \ \ \ \ \ \ \ \ \ "profileDesc": "" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||||
|
${aaa} Evaluate type(${reqHeader_edit} )
|
||||||
|
log ${aaa}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||||
481
01-TestCase/tsg_bfapi/setting/Hijack_file_24_type.robot
Normal file
481
01-TestCase/tsg_bfapi/setting/Hijack_file_24_type.robot
Normal file
@@ -0,0 +1,481 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||||
|
Force Tags tsg_adc Security_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 ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||||
|
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||||
|
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||||
|
Library Custometest
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${url} /policy/profile/hijackfiles
|
||||||
|
${profileId} ${EMPTY}
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Hijack_file_24_type_apk-00000
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-0.apk contentType=application/vnd.android.package-archive
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-0.apk ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
#DeletePolicyFile ${url} ${profileId}
|
||||||
|
|
||||||
|
Hijack_file_24_type_exe-00001
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-1.exe contentType=application/x-msdos-program
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-1.exe ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_gif-00002
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-2.gif contentType=image/gif
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-2.gif ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_html-00003
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-3.html contentType=text/html
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-3.html ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_jpeg-00004
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-4.jpeg contentType=image/jpeg
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-4.jpeg ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_png-00005
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-5.png contentType=image/png
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-5.png ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_png-00005-1
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-5.png contentType=application/x-png
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-5.png ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_svg-00006
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-6.svg contentType=image/svg%2Bxml
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-6.svg ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_rpm-00007
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-7.rpm contentType=audio/x-pn-realaudio-plugin
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-7.rpm ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_dmg-00008
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-8.dmg contentType=application/x-apple-diskimage
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-8.dmg ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_js-00009
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-9.js contentType=application/x-javascript
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-9.js ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_rar-00010
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-10.rar contentType=application/octet-stream
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-10.rar ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_zip-00011
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-11.zip contentType=application/x-zip-compressed
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-11.zip ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_doc-00012
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-12.doc contentType=application/msword
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-12.doc ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_docx-00013
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-13.docx contentType=application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-13.docx ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_json-00014
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-14.json contentType=application/json
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-14.json ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_xml-00015
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-15.xml contentType=text/xml
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-15.xml ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_pdf-00016
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-16.pdf contentType=application/pdf
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-16.pdf ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_xls-00017
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-17.xls contentType=application/vnd.ms-excel
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-17.xls ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_xls-00017-1
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-17.xls contentType=application/x-xls
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-17.xls ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_xlsx-00018
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-18.xlsx contentType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-18.xlsx ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_ppt-00019
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-19.ppt contentType=application/vnd.ms-powerpoint
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-19.ppt ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_ppt-00019-1
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-19.ppt contentType=application/x-ppt
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-19.ppt ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_pptx-00020
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-20.pptx contentType=application/vnd.openxmlformats-officedocument.presentationml.presentation
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-20.pptx ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_odt-00021
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-21.odt contentType=application/vnd.oasis.opendocument.text
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-21.odt ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_css-00022
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-22.css contentType=text/css
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-22.css ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_csv-00023
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-23.csv contentType=text/comma-separated-values
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-23.csv ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_plain-00024
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-24.plain contentType=text/plain
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-24.plain ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
|
|
||||||
|
Hijack_file_24_type_txt-00025
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-24.txt contentType=text/plain
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-24.txt ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||||
81
01-TestCase/tsg_bfapi/setting/InsertScriptsPolicy.robot
Normal file
81
01-TestCase/tsg_bfapi/setting/InsertScriptsPolicy.robot
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||||
|
Force Tags tsg_adc Security_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 ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||||
|
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||||
|
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||||
|
Library Custometest
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${url} /policy/profile/insertscripts
|
||||||
|
${profileId} ${EMPTY}
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Insert_Scripts_js_before-00001
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest format=js insertOn=before_page_load
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_insert} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} insert_files/ Create-Insert Scripts-test-1.js ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqHeader_edit} Set Variable {"isValid":1,"format":"css","insertOn":"","opAction":"update","profileName":"test_edit","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} insert_files/ Create-Insert Scripts-test.css ${reqHeader_edit}
|
||||||
|
|
||||||
|
Insert_Scripts_js_after-00002
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest format=js insertOn=after_page_load
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_insert} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} insert_files/ Create-Insert Scripts-test-1.js ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqHeader_edit} Set Variable {"isValid":1,"format":"css","insertOn":"","opAction":"update","profileName":"test_edit","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} insert_files/ Create-Insert Scripts-test.css ${reqHeader_edit}
|
||||||
|
|
||||||
|
Insert_Scripts_css_before-00003
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest format=css insertOn=""
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_insert} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} insert_files/ Create-Insert Scripts-test.css ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqHeader_edit} Set Variable {"isValid":1,"format":"js","insertOn":"before_page_load ","opAction":"update","profileName":"test_edit","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} insert_files/ Create-Insert Scripts-test-1.js ${reqHeader_edit}
|
||||||
|
|
||||||
|
Insert_Scripts_css_after-00004
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest format=css insertOn=""
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_insert} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} insert_files/ Create-Insert Scripts-test.css ${objectDict}
|
||||||
|
log 12313123123123213123213
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqHeader_edit} Set Variable {"isValid":1,"format":"js","insertOn":"after_page_load \ ","opAction":"update","profileName":"test_edit","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} insert_files/ Create-Insert Scripts-test-1.js ${reqHeader_edit}
|
||||||
35
01-TestCase/tsg_bfapi/setting/IntermediaCert.robot
Normal file
35
01-TestCase/tsg_bfapi/setting/IntermediaCert.robot
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Force Tags tsg_bf_api Cached_Intermediate_Certificates
|
||||||
|
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
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${url} /policy/exch/intermediacert
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Intermedia Cert Policy case
|
||||||
|
|
||||||
|
# 查询1
|
||||||
|
${suffix_quary} Catenate SEPARATOR=& certId=269 sni=nationalbank.kz
|
||||||
|
QueryPolicyFile ${url} ${suffix_quary}
|
||||||
|
|
||||||
|
# 查询2
|
||||||
|
${suffix_quary} Catenate SEPARATOR=& certIds=263,265 sni=dw-online.ksosoft
|
||||||
|
QueryPolicyFile ${url} ${suffix_quary}
|
||||||
|
|
||||||
|
# 启用/暂停
|
||||||
|
${certId} QueryPolicyFile2 ${url} isValid=1
|
||||||
|
${certIds} Create List ${certId}
|
||||||
|
${data} Set Variable {"opAction":"disable","certIds":${certIds}}
|
||||||
|
UpdatePolicyFile2 ${url} ${data}
|
||||||
|
${data2} Set Variable {"opAction":"enable","certIds":${certIds}}
|
||||||
|
UpdatePolicyFile2 ${url} ${data2}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
48
01-TestCase/tsg_bfapi/setting/KeyringPolicyFile.robot
Normal file
48
01-TestCase/tsg_bfapi/setting/KeyringPolicyFile.robot
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Test Teardown TeardownDelete ${url} keyringIds ${keyringId}
|
||||||
|
Force Tags tsg_bf_api Decryption_Keyrings
|
||||||
|
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
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${url} /policy/profile/keyringobj
|
||||||
|
${keyringId} ${EMPTY}
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Settings-ProxyProfiles-KeyringFile_root-00001
|
||||||
|
# 新增 root
|
||||||
|
${response} CreatePolicyMutipartFile ${url} keyrings/root/ mesalab-ca-cert.pem mesalab-ca-key.pem root
|
||||||
|
# 查询
|
||||||
|
${keyringId} Get From Dictionary ${response} keyringId
|
||||||
|
${keyringName} Get From Dictionary ${response} keyringName
|
||||||
|
QueryPolicyFile ${url} keyringId=${keyringId}&keyringName=${keyringName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"opAction":"update","returnData":1,"keyringName":"test_edit","keyringType":"end-entity","reissueExpiryHour":0,"crl":"null","publicKeyAlgo":"rsa2048","keyringId":"${keyringId}","includeRoot":0}
|
||||||
|
UpdatePolicyMutipartFile ${url} Keyrings/end-entity/ tang-ca-v3-www.amazon.cn-cer.pem tang-ca-v3-www.amazon.cn-key.pem ${header_edit}
|
||||||
|
|
||||||
|
Settings-ProxyProfiles-KeyringFile_end-entity-00002
|
||||||
|
# 新增 end-entity
|
||||||
|
${response} CreatePolicyMutipartFile ${url} keyrings/end-entity/ tang-ca-v3-www.bing.com-cer.cer tang-ca-v3-www.bing.com-key.pem end-entity
|
||||||
|
# 查询
|
||||||
|
${keyringId} Get From Dictionary ${response} keyringId
|
||||||
|
${keyringName} Get From Dictionary ${response} keyringName
|
||||||
|
QueryPolicyFile ${url} keyringId=${keyringId}&keyringName=${keyringName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"opAction":"update","returnData":1,"keyringName":"test_edit","keyringType":"end-entity","reissueExpiryHour":0,"crl":"null","publicKeyAlgo":"rsa2048","keyringId":"${keyringId}","includeRoot":0}
|
||||||
|
UpdatePolicyMutipartFile ${url} Keyrings/end-entity/ tang-ca-v3-www.amazon.cn-cer.pem tang-ca-v3-www.amazon.cn-key.pem ${header_edit}
|
||||||
|
|
||||||
|
Settings-ProxyProfiles-KeyringFile_Intermediate-00003
|
||||||
|
# 新增 end-entity
|
||||||
|
${response} CreatePolicyMutipartFile ${url} keyrings/Intermediate/ tang-ca-v3-intermediate-01-cer.pem tang-ca-v3-intermediate-01-key.pem Intermediate
|
||||||
|
# 查询
|
||||||
|
${keyringId} Get From Dictionary ${response} keyringId
|
||||||
|
${keyringName} Get From Dictionary ${response} keyringName
|
||||||
|
QueryPolicyFile ${url} keyringId=${keyringId}&keyringName=${keyringName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"opAction":"update","returnData":1,"keyringName":"test_edit","keyringType":"end-entity","reissueExpiryHour":0,"crl":"null","publicKeyAlgo":"rsa2048","keyringId":"${keyringId}","includeRoot":0}
|
||||||
|
UpdatePolicyMutipartFile ${url} keyrings/end-entity/ tang-ca-v3-www.amazon.cn-cer.pem tang-ca-v3-www.amazon.cn-key.pem ${header_edit}
|
||||||
38
01-TestCase/tsg_bfapi/setting/ResponsePagesPolicy.robot
Normal file
38
01-TestCase/tsg_bfapi/setting/ResponsePagesPolicy.robot
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||||
|
Force Tags tsg_bf_api Response_Pages
|
||||||
|
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
|
||||||
|
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
|
||||||
|
Library Custometest
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${url} /policy/profile/responsepages
|
||||||
|
${profileId} ${EMPTY}
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Response_page_html-00001
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest format=html
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_reponse_page} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreatePolicyFile4 ${url} response_pages_files/ Create-Response Pages-test.html ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"format":"html","opAction":"update","profileName":"test_edit","profileId":"${profileId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} response_pages_files/ Create-Response Pages-test.html ${header_edit}
|
||||||
97
01-TestCase/tsg_bfapi/setting/TrafficMirrorPolicy.robot
Normal file
97
01-TestCase/tsg_bfapi/setting/TrafficMirrorPolicy.robot
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||||
|
Force Tags tsg_bf_api Traffic_Mirror_Profiles
|
||||||
|
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
|
||||||
|
Library Custometest
|
||||||
|
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
||||||
|
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||||
|
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${url} /policy/profile/trafficmirror
|
||||||
|
${profileId} ${EMPTY}
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
TrafficMirrorPolicy_vlan_Single_object-00001
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${list} Create List 1
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest addrType=vlan addrArray=${list}
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_traffic_mirror_profiles} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"trafficMirrorList":[{"profileId":"${profileId}","profileName":"test_edit","addrType":"vlan","isValid":1,"addrArray":["256"]}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
TrafficMirrorPolicy_vlan_Multi_object-00002
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${list} Create List 1 2
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest addrType=vlan addrArray=${list}
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_traffic_mirror_profiles} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"trafficMirrorList":[{"profileId":"${profileId}","profileName":"test_edit","addrType":"vlan","isValid":1,"addrArray":["256"]}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
TrafficMirrorPolicy_mac_Single_object-00003
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${list} Create List 13:13:13:13:13:13
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest addrType=mac addrArray=${list}
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_traffic_mirror_profiles} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"trafficMirrorList":[{"profileId":"${profileId}","profileName":"test_edit","addrType":"vlan","isValid":1,"addrArray":["256"]}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
TrafficMirrorPolicy_mac_Multi_object-00004
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${list} Create List 13:13:13:13:13:13 13:13:13:13:13:13
|
||||||
|
${objectedit} Create Dictionary profileName=zmminserttest addrType=mac addrArray=${list}
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_traffic_mirror_profiles} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
log ${response}
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
${profileName} Get From Dictionary ${response} profileName
|
||||||
|
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||||
|
# 修改
|
||||||
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"trafficMirrorList":[{"profileId":"${profileId}","profileName":"test_edit","addrType":"vlan","isValid":1,"addrArray":["256"]}]}
|
||||||
|
${aaa} Evaluate type(${reqData_edit})
|
||||||
|
log ${aaa}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
56
01-TestCase/tsg_bfapi/setting/TrustedCertPolicy.robot
Normal file
56
01-TestCase/tsg_bfapi/setting/TrustedCertPolicy.robot
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Test Teardown TeardownDelete ${url} certIds ${certId}
|
||||||
|
Force Tags 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
|
||||||
|
Library Custometest
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${url} /policy/profile/trustedcacertobj
|
||||||
|
${certId} ${EMPTY}
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
TrustedCertPolicy_root-00001
|
||||||
|
# 新增
|
||||||
|
${response} CreatePolicyFile ${url} keyrings/root/ tango-ca-trust-ca-cer.pem
|
||||||
|
# 查询
|
||||||
|
${certId} Get From Dictionary ${response} certId
|
||||||
|
${certName} Get From Dictionary ${response} certName
|
||||||
|
QueryPolicyFile ${url} certId=${certId}&certName=${certName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"opAction":"update","certName":"test_edit","certId":"${certId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} keyrings/end-entity/ tang-ca-v3-www.amazon.cn-cer.pem ${header_edit}
|
||||||
|
|
||||||
|
TrustedCertPolicy_end-entity-00002
|
||||||
|
# 新增
|
||||||
|
${response} CreatePolicyFile ${url} keyrings/end-entity/ tang-ca-v3-www.amazon.cn-cer.pem
|
||||||
|
# 查询
|
||||||
|
${certId} Get From Dictionary ${response} certId
|
||||||
|
${certName} Get From Dictionary ${response} certName
|
||||||
|
QueryPolicyFile ${url} certId=${certId}&certName=${certName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"opAction":"update","certName":"test_edit","certId":"${certId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} keyrings/root/ tango-ca-trust-ca-cer.pem ${header_edit}
|
||||||
|
|
||||||
|
TrustedCertPolicy_Intermediate-00003
|
||||||
|
# 新增
|
||||||
|
${response} CreatePolicyFile ${url} keyrings/Intermediate/ tang-ca-v3-intermediate-01-cer.pem
|
||||||
|
# 查询
|
||||||
|
${certId} Get From Dictionary ${response} certId
|
||||||
|
${certName} Get From Dictionary ${response} certName
|
||||||
|
QueryPolicyFile ${url} certId=${certId}&certName=${certName}
|
||||||
|
# 修改
|
||||||
|
${header_edit} Set Variable {"isValid":1,"opAction":"update","certName":"test_edit","certId":"${certId}","returnData":1}
|
||||||
|
UpdatePolicyFile ${url} keyrings/root/ tango-ca-trust-ca-cer.pem ${header_edit}
|
||||||
33
01-TestCase/tsg_bfapi/setting/claimedsrcip.robot
Normal file
33
01-TestCase/tsg_bfapi/setting/claimedsrcip.robot
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||||
|
Force Tags tsg_adc Security_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 ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||||
|
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||||
|
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||||
|
Library Custometest
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${url} policy/profile/claimedsrcip
|
||||||
|
${profileId} ${EMPTY}
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
claimedsrcip-00001
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${list} Create List 192.168.0.1/16 192.168.0.2/16 192.168.0.3/24
|
||||||
|
${objectedit} Create Dictionary profileName=12313 addrType=4 ipList=${list}
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_claimedsrcip} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} Post-Request ${url} ${objectDict}
|
||||||
|
#查询
|
||||||
|
${profileId} Set Variable ${response['data']['list'][0]["profileId"]}
|
||||||
|
${profileName} Set Variable ${response['data']['list'][0]["profileName"]}
|
||||||
|
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||||
|
# 修改
|
||||||
|
log ${profileId}
|
||||||
|
${reqHeader_edit} Set Variable {"opAction": "add","returnData": 1,"claimedSrcIpList":[{"profileId":1,"profileName":"1231","addrType":4,"ipList":["192.168.0.1/16","192.168.0.2/16","192.168.0.3/24"],"isValid":1,"profileDesc":""}],"isValid":1,"profileDesc":""}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||||
33
01-TestCase/tsg_bfapi/setting/redirectdestination.robot
Normal file
33
01-TestCase/tsg_bfapi/setting/redirectdestination.robot
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||||
|
Force Tags tsg_adc Security_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 ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||||
|
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||||
|
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||||
|
Library Custometest
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${url} policy/profile/redirectdestination
|
||||||
|
${profileId} ${EMPTY}
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
claimedsrcip-00001
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${list} Create List 192.168.0.1/16 192.168.0.2/16 192.168.0.3/24
|
||||||
|
${objectedit} Create Dictionary profileName=12313 addrType=4 ipList=${list}
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_claimedsrcip} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} Post-Request ${url} ${objectDict}
|
||||||
|
#查询
|
||||||
|
${profileId} Set Variable ${response['data']['list'][0]["profileId"]}
|
||||||
|
${profileName} Set Variable ${response['data']['list'][0]["profileName"]}
|
||||||
|
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||||
|
# 修改
|
||||||
|
log ${profileId}
|
||||||
|
${reqHeader_edit} Set Variable {"opAction": "add","returnData": 1,"claimedSrcIpList":[{"profileId":1,"profileName":"1231","addrType":4,"ipList":["192.168.0.1/16","192.168.0.2/16","192.168.0.3/24"],"isValid":1,"profileDesc":""}],"isValid":1,"profileDesc":""}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||||
33
01-TestCase/tsg_bfapi/setting/reflector.robot
Normal file
33
01-TestCase/tsg_bfapi/setting/reflector.robot
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||||
|
Force Tags tsg_adc Security_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 ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||||
|
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||||
|
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||||
|
Library Custometest
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${url} policy/profile/reflector
|
||||||
|
${profileId} ${EMPTY}
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
reflector-00001
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${list} Create List 192.168.0.1 192.168.0.2 192.168.0.3
|
||||||
|
${objectedit} Create Dictionary profileName=12313 reflectorType=DNS ipList=${list}
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_reflector} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} Post-Request ${url} ${objectDict}
|
||||||
|
#查询
|
||||||
|
${profileId} Set Variable ${response['data']['list'][0]["profileId"]}
|
||||||
|
${profileName} Set Variable ${response['data']['list'][0]["profileName"]}
|
||||||
|
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||||
|
# 修改
|
||||||
|
log ${profileId}
|
||||||
|
${reqHeader_edit} Set Variable {"opAction": "update","returnData": 1,"reflectorList":[{"profileId":${profileId} ,"profileName":"12313","addrType":4,"reflectorType":"dns","ipList":["192.168.0.1","192.168.0.2","192.168.0.3"],"isValid":1,"profileDesc":""}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||||
32
01-TestCase/tsg_bfapi/setting/reflector_payload.robot
Normal file
32
01-TestCase/tsg_bfapi/setting/reflector_payload.robot
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||||
|
Force Tags tsg_adc Security_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 ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||||
|
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||||
|
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||||
|
Library Custometest
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${url} policy/profile/reflector/payload
|
||||||
|
${profileId} ${EMPTY}
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
reflector-00001
|
||||||
|
#Hijack 需要修改的内容
|
||||||
|
${objectedit} Create Dictionary profileName=12313 reflectorType=dns payload=SSBMT1ZFIFlPVSDmiJHniLHkvaA=
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
${objectDict} Jsoneditmanu ${settig_proxy_profiles_reflector_payload} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} Post-Request ${url} ${objectDict}
|
||||||
|
#查询
|
||||||
|
${profileId} Set Variable ${response['data']['list'][0]["profileId"]}
|
||||||
|
${profileName} Set Variable ${response['data']['list'][0]["profileName"]}
|
||||||
|
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||||
|
# 修改
|
||||||
|
log ${profileId}
|
||||||
|
${reqHeader_edit} Set Variable {"opAction": "update","returnData": 1,"reflectorList":[{"profileId":1,"profileName":"zzzzzzz","reflectorType":"dns","payload":"SSBMT1ZFIFlPVSDmiJHniLHkvaA=","isValid":1,"profileDesc":""}]}
|
||||||
|
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||||
Reference in New Issue
Block a user