目录移动到setting,删除此目录
This commit is contained in:
@@ -1,50 +0,0 @@
|
|||||||
*** 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}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
*** 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
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${url} /v1/policy/profile/decryption
|
|
||||||
${profileId} ${EMPTY}
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
Decryption_ADD_001
|
|
||||||
|
|
||||||
Comment 全串{"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{"dynamic_bypass":{"ev_cert":1,"cert_transparency":1,"mutual_authentication":1,"cert_pinning":1,"protocol_errors":1},"protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1},"certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"fail-close"}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
|
||||||
Comment "dynamic_bypass":{"ev_cert":1,"cert_transparency":1,"mutual_authentication":1,"cert_pinning":1,"protocol_errors":1}
|
|
||||||
Comment "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
|
||||||
Comment dynamic_bypass
|
|
||||||
Comment 拦截排除参数对象
|
|
||||||
Comment ev_cert Integer 是 ON/OFF,缺省OFF,1表示ON,0表示OFF
|
|
||||||
Comment cert_transparency Integer 是 ON/OFF,缺省OFF,1表示ON,0表示OFF
|
|
||||||
Comment mutual_authentication Integer 是 ON/OFF,缺省ON,1表示ON,0表示OFF
|
|
||||||
Comment cert_pinning Integer 是 Blocl/Bypass,缺省Block,1表示Block,0表示Bypass
|
|
||||||
Comment protocol_errors Integer 是 ON/OFF,缺省ON,1表示ON,0表示OFF
|
|
||||||
Comment protocol_version Object 是 协议版本对象
|
|
||||||
Comment min Integer 否 如果mirror_client=1,则此参数可为空
|
|
||||||
Comment max Integer 否 如果mirror_client=1,则此参数可为空
|
|
||||||
Comment mirror_client Integer 是 ON/OFF,缺省ON,1表示ON,0表示OFF
|
|
||||||
Comment allow_http2 Integer 是 1表示ON,0表示OFF
|
|
||||||
Comment certificate_checks Object 是 证书检查参数对象
|
|
||||||
Comment approachObject 是 certificateChecksObj对象参数
|
|
||||||
Comment cn Integer 是 approach对象参数,ON/OFF,缺省ON, 1表示ON,0表示OFF
|
|
||||||
Comment issuer Integer 是 approach对象参数,ON/OFF,缺省ON, 1表示ON,0表示OFF
|
|
||||||
Comment self-signed Integer 是 approach对象参数, ON/OFF,缺省ON, 1表示ON,0表示OFF
|
|
||||||
Comment expiration Integer 是 approach对象参数,ON/OFF,缺省ON, 1表示ON,0表示OFF
|
|
||||||
Comment fail_action String 是 certificateChecksObj对象参数,值为: fail-close pass-through
|
|
||||||
Comment isValid Integer 是 是否有效
|
|
||||||
Comment isInitialize Integer 否 0:非内置,缺省 1:内置
|
|
||||||
|
|
||||||
${dynamic_bypass} set variable "dynamic_bypass":{"ev_cert":1,"cert_transparency":1,"mutual_authentication":1,"cert_pinning":1,"protocol_errors":1}
|
|
||||||
${protocol_version} set variable "protocol_version":{"min":"","max":"","mirror_client":1,"allow_http2":1}
|
|
||||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"fail-close"}
|
|
||||||
${requestbody} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
|
||||||
${data} Create List ${requestbody}
|
|
||||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
|
||||||
|
|
||||||
# 查询
|
|
||||||
${profileId} Get From Dictionary ${response} profileId
|
|
||||||
${profileName} Get From Dictionary ${response} profileName
|
|
||||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
|
||||||
|
|
||||||
|
|
||||||
# 修改
|
|
||||||
${dynamic_bypass}="dynamic_bypass":{"ev_cert":0,"cert_transparency":0,"mutual_authentication":0,"cert_pinning":0,"protocol_errors":0}
|
|
||||||
${protocol_version}="protocol_version":{"min":"ssl3","max":"tls13","mirror_client":0,"allow_http2":0}
|
|
||||||
${certificate_checks}="certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"pass-through"}
|
|
||||||
${requestbody}={"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_edit","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":0,"isInitialize":0,"profileDesc":""}]}
|
|
||||||
@{data} set variable ${requestbody}
|
|
||||||
UpdatePolicyFile2 ${url} ${reqData_edit} @{data}
|
|
||||||
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
*** Settings ***
|
|
||||||
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
|
||||||
Force Tags tsg_bf_api Hijack_Files
|
|
||||||
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/hijackfiles
|
|
||||||
${profileId} ${EMPTY}
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
Hijack Files Policy CRUD case
|
|
||||||
|
|
||||||
# 新增
|
|
||||||
${response} CreatePolicyFile2 ${url} hijack_files/ Create-Hijack Files-test-3.html hijack
|
|
||||||
|
|
||||||
# 查询
|
|
||||||
${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-files/ Create-Hijack Files-test-5.png ${header_edit}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,287 +0,0 @@
|
|||||||
*** 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} /v1/policy/profile/hijackfiles
|
|
||||||
${profileId} ${EMPTY}
|
|
||||||
*** Keywords ***
|
|
||||||
ProfileComman
|
|
||||||
[Arguments] ${objectedit} ${type} ${fileName}
|
|
||||||
${default_json} ${default_files} ${default_url} Run Keyword If "${type}"=="hijack" Set Variable ${setting_proxy_profiles_hijack} hijack_files/ /policy/profile/hijackfiles
|
|
||||||
... ELSE IF Run Keyword If "${type}"=="insert" Set Variable ${setting_proxy_profiles_insert} insert_files/ /policy/profile/insertfiles
|
|
||||||
... ELSE Set Variable a b c
|
|
||||||
|
|
||||||
${objectDict} Jsoneditmanu ${default_json} ${objectedit}
|
|
||||||
log ${objectDict}
|
|
||||||
${response} CreatePolicyFile4 ${default_url} ${default_files} ${fileName} ${objectDict}
|
|
||||||
#${url} ${filePath} ${fileName} ${objectDict}
|
|
||||||
[Return] ${response}
|
|
||||||
*** Test Cases ***
|
|
||||||
Hijack_file_24_type-apk
|
|
||||||
#Hijack 需要修改的内容
|
|
||||||
${objectedit} Create Dictionary profileName=Hijack_file_24_type-apk contentName=Create-Hijack Files-test-0.apk contentType=application/vnd.android.package-archive
|
|
||||||
${response} ProfileComman ${objectedit} hijack Create-Hijack Files-test-0.apk
|
|
||||||
# 查询
|
|
||||||
${profileId} Get From Dictionary ${response} profileId
|
|
||||||
${profileId} set Variable ${profileId}
|
|
||||||
|
|
||||||
Hijack_file_24_type-00000
|
|
||||||
#Hijack 需要修改的内容
|
|
||||||
${objectedit} Create Dictionary profileName=Hijack_file_24_type-00000 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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
|
|
||||||
Hijack_file_24_type-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/ ${objectDict}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
*** Settings ***
|
|
||||||
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
|
||||||
Force Tags tsg_bf_api Insert_Scripts
|
|
||||||
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/insertscripts
|
|
||||||
${profileId} ${EMPTY}
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
Insert Scripts Policy CRUD case
|
|
||||||
|
|
||||||
# 新增
|
|
||||||
${response} CreatePolicyFile2 ${url} insert_files/ Create-Insert Scripts-test-1.js insert
|
|
||||||
|
|
||||||
# 查询
|
|
||||||
${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","opAction":"update","profileName":"test_edit","profileId":"${profileId}","returnData":1}
|
|
||||||
UpdatePolicyFile ${url} Insert Scripts-files/ Create-Insert Scripts-test.css ${reqHeader_edit}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
*** 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} /v1/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}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
*** 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 ***
|
|
||||||
Keyring Policy File case
|
|
||||||
|
|
||||||
# 新增
|
|
||||||
${response} CreatePolicyMutipartFile ${url} keyrings/root/ mesalab-ca-cert.pem mesalab-ca-key.pem
|
|
||||||
|
|
||||||
# 查询
|
|
||||||
${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}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
*** 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
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${url} /policy/profile/responsepages
|
|
||||||
${profileId} ${EMPTY}
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
Response Pages Policy CRUD case
|
|
||||||
|
|
||||||
# 新增
|
|
||||||
${response} CreatePolicyFile2 ${url} response_pages_files/ Create-Response Pages-test-1.html resPages
|
|
||||||
|
|
||||||
# 查询
|
|
||||||
${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}
|
|
||||||
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
*** 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
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${url} /v1/policy/profile/trafficmirror
|
|
||||||
${profileId} ${EMPTY}
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
Traffic Mirror Policy CRUD case
|
|
||||||
|
|
||||||
# 新增
|
|
||||||
${response} CreatePolicyFile3 ${url}
|
|
||||||
|
|
||||||
# 查询
|
|
||||||
${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}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
*** 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
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${url} /policy/profile/trustedcacertobj
|
|
||||||
${certId} ${EMPTY}
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
Trusted Cert Policy CRUD case
|
|
||||||
|
|
||||||
# 新增
|
|
||||||
${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/Intermediate/ tang-ca-v3-intermediate-01-cer.pem ${header_edit}
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user