From 9324ed155eb1a631750b786a4715414de1583088 Mon Sep 17 00:00:00 2001 From: hebingning Date: Wed, 14 Apr 2021 10:51:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=90=86deny?= =?UTF-8?q?=E5=8A=A8=E4=BD=9C=E7=9A=848=E4=B8=AA=E5=AD=90=E4=B8=B2?= =?UTF-8?q?=E5=8F=8A=E5=85=B616=E8=BF=9B=E5=88=B6=E7=9A=84=E7=94=A8?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tsg_adc/multi_step/a_Deny_Ftp_Tests.robot | 2 +- .../multi_step/a_Deny_Mail_Tests.robot | 20 +++ .../tsg_adc/multi_step/a_Deny_Tests.robot | 42 +++++- .../multi_step/a_Monitor_Mail_Tests.robot | 20 +++ .../b_BAllow_Http_Tests_Verify.robot | 1 - .../b_BAllow_Ssl_Tests_Verify.robot | 1 - .../multi_step/b_BAllow_Tests_Verify.robot | 1 - .../multi_step/b_Deny_Http_Tests.robot | 10 +- .../multi_step/b_Deny_Mail_Tests.robot | 18 ++- .../tsg_adc/multi_step/b_Deny_Tests.robot | 11 ++ .../multi_step/b_EDeny_Dns_Tests_Verify.robot | 1 - .../multi_step/b_EDeny_Ftp_Tests_Verify.robot | 1 - .../b_EDeny_Http_Tests_Verify.robot | 1 - .../multi_step/b_EDeny_Mail_Tests.robot | 1 - .../multi_step/b_EDeny_Ssl_Tests.robot | 1 - .../multi_step/b_EDeny_Tests_Verify.robot | 1 - .../multi_step/b_IHijack_Tests_Verify.robot | 1 - .../tsg_adc/multi_step/b_JInsert_Tests.robot | 1 - .../multi_step/b_JIntercept_Http_Tests.robot | 1 - .../multi_step/b_JIntercept_Ssl_Tests.robot | 1 - .../multi_step/b_Monitor_Mail_Tests.robot | 19 +++ .../multi_step/b_NMonitor_Ftp_Tests.robot | 123 ++++++++++++++++++ .../multi_step/b_NMonitor_Http_Tests.robot | 1 - .../multi_step/b_NMonitor_Mail_Tests.robot | 1 - .../multi_step/b_NMonitor_Ssl_Tests.robot | 1 - .../tsg_adc/multi_step/b_NMonitor_Tests.robot | 1 - .../multi_step/b_SReplace_Tests_Verify.robot | 1 - .../tsg_adc/multi_step/c_Deny_Mail_Test.robot | 9 ++ .../tsg_adc/multi_step/c_Deny_Tests.robot | 14 ++ .../multi_step/c_Monitor_Mail_Tests.robot | 9 ++ .../curl/command/ProxyPolicy_Deny_00019.bat | 1 + 31 files changed, 290 insertions(+), 26 deletions(-) create mode 100644 01-TestCase/tsg_adc/multi_step/b_NMonitor_Ftp_Tests.robot create mode 100644 05-Other/curl/command/ProxyPolicy_Deny_00019.bat diff --git a/01-TestCase/tsg_adc/multi_step/a_Deny_Ftp_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Deny_Ftp_Tests.robot index 9e25cd7..7171f7e 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Deny_Ftp_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Deny_Ftp_Tests.robot @@ -45,7 +45,7 @@ SecurityPolicy-Deny-Ftp-00001 insert_policyId_to_file1 deny_ftp_objectId2 ${object_content_Id} insert_policyId_to_file1 deny_ftp_objectId12 ${objectId1} insert_policyId_to_file1 deny_ftp_objectId13 ${object_Account_Id} - insert_policyId_to_file1 deny_ftp_objectId14 ${object_url_Id} + insert_policyId_to_file1 deny_ftp_objectId14 ${object_url_Id1} insert_policyId_to_file1 deny_ftp_objectId15 ${object_content_Id} insert_policyId_to_file1 deny_ftp_policyId ${policyId} diff --git a/01-TestCase/tsg_adc/multi_step/a_Deny_Mail_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Deny_Mail_Tests.robot index b52b2fe..50e2165 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Deny_Mail_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Deny_Mail_Tests.robot @@ -304,3 +304,23 @@ SecurityPolicy-Deny-Mail-00016 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_mail_policyId15 ${policyId} + +SecurityPolicy-Deny-Mail-00017 + [Tags] content右匹配 + Comment 创建Subject + ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=denymail017 + ${rescode} ${object_Subject_Id} AddObject2 ${1} ${objectDict} + Comment 创建Account + ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=hebingning2021@ + ${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict} + Comment 创建Content + ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Deny17* + ${rescode} ${object_Content_Id} AddObject2 ${1} ${objectDict} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Mail-00017 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"MAIL","method":"rst"} filterList=${object_Account_Id}|TSG_FIELD_MAIL_ACCOUNT,${object_Subject_Id}|TSG_FIELD_MAIL_SUBJECT,${object_Content_Id}|TSG_FIELD_MAIL_CONTENT isValid=${1} appIdObjects=${MAIL_ID} + ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 + ${policyId} Get-Pids ${policyId} + ${policyId} Set Variable ${policyId}[0] + insert_policyId_to_file1 deny_mail_objectId37 ${object_Subject_Id} + insert_policyId_to_file1 deny_mail_objectId38 ${object_Account_Id} + insert_policyId_to_file1 deny_mail_policyId16 ${policyId} diff --git a/01-TestCase/tsg_adc/multi_step/a_Deny_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Deny_Tests.robot index 7404f62..bd76f0c 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Deny_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Deny_Tests.robot @@ -574,5 +574,45 @@ Proxy-Policy-deny-00018 insert_policyId_to_file1 intercept_deny_policyId14 ${policyId1} insert_policyId_to_file1 deny_policyId16 ${policyId2} -Proxy-Policy-deny-00018 +Proxy-Policy-deny-00019 [Tags] substring + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.cndns.com + ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.cndns.com/cn/sms/index.aspx + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + Comment keyword8个子串,创建应答体 + ${addItemList1} Create Dictionary keywordArray=美橙短信,短信群发,到达率更强,企业营销类,短信验证,群发服务,正规106网关,联通全面 isHexbin=${0} + ${addItemLists} Create list ${addItemList1} + ${objectDict} Create Dictionary objectType=keywords objectSubType=keywords isValid=${1} addItemList=${addItemLists} + ${rescode} ${object_res_cont_Id} AddObjects ${1} ${objectDict} + Comment user-agent8个子串,创建请求头 + ${addItemList1} Create Dictionary keywordArray=4d6f7a696c6c612f352e30,57696e646f7773,57696e3634,783634,4170706c65,65624b6974,4b48544d4c,6c696b65 isHexbin=${1} district=User-Agent + ${addItemLists} Create list ${addItemList1} + ${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists} + ${rescode} ${object_ua_Id} AddObjects ${1} ${objectDict} + Comment cont-Type8个子串,创建应答头 + ${addItemList1} Create Dictionary keywordArray=7465,78742f,6874,6d6c,68746d6c,63686172,736574,63686172736574 isHexbin=${1} district=Content-Type + ${addItemLists} Create list ${addItemList1} + ${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists} + ${rescode} ${object_ct_Id} AddObjects ${1} ${objectDict} + Comment 创建拦截策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny-0019 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID} + log ${policyDict} + ${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2 + ${policyId1} Get-Pids ${policyId1} + ${policyId1} Set Variable ${policyId1}[0] + Comment 创建deny策略 + ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00019 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"protocol":"HTTP"} filterList=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_ua_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_res_cont_Id}|TSG_FIELD_HTTP_RES_CONTENT,${object_ct_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=${HTTP_ID} + log ${policyDict} + ${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2 + ${policyId2} Get-Pids ${policyId2} + ${policyId2} Set Variable ${policyId2}[0] + insert_policyId_to_file1 deny_objectId60 ${object_fqdn_Id} + insert_policyId_to_file1 deny_objectId61 ${object_url_Id} + insert_policyId_to_file1 deny_objectId62 ${object_res_cont_Id} + insert_policyId_to_file1 deny_objectId63 ${object_ua_Id} + insert_policyId_to_file1 deny_objectId64 ${object_ct_Id} + insert_policyId_to_file1 intercept_deny_policyId18 ${policyId1} + insert_policyId_to_file1 deny_policyId18 ${policyId2} diff --git a/01-TestCase/tsg_adc/multi_step/a_Monitor_Mail_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Monitor_Mail_Tests.robot index 4449792..16cf185 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Monitor_Mail_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Monitor_Mail_Tests.robot @@ -298,3 +298,23 @@ SecurityPolicy-Monitor-Mail-00015 insert_policyId_to_file1 monitor_mail_objectId30 ${object_To_Id} insert_policyId_to_file1 monitor_mail_objectId31 ${object_Account_Id} insert_policyId_to_file1 monitor_mail_policyId14 ${policyId} + +SecurityPolicy-Monitor-Mail-00016 + [Tags] content右匹配 + Comment 创建Subject + ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=monitorMail16 + ${rescode} ${object_Subject_Id} AddObject2 ${1} ${objectDict} + Comment 创建Account + ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=hebingning + ${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict} + Comment 创建Content + ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Monitor16* + ${rescode} ${object_Content_Id} AddObject2 ${1} ${objectDict} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Mail-00016 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"MAIL"} filterList=${object_Account_Id}|TSG_FIELD_MAIL_ACCOUNT,${object_Subject_Id}|TSG_FIELD_MAIL_SUBJECT,${object_Content_Id}|TSG_FIELD_MAIL_CONTENT isValid=${1} appIdObjects=${MAIL_ID} + ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 + ${policyId} Get-Pids ${policyId} + ${policyId} Set Variable ${policyId}[0] + insert_policyId_to_file1 monitor_mail_objectId38 ${object_Subject_Id} + insert_policyId_to_file1 monitor_mail_objectId39 ${object_Account_Id} + insert_policyId_to_file1 monitor_mail_policyId15 ${policyId} diff --git a/01-TestCase/tsg_adc/multi_step/b_BAllow_Http_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_BAllow_Http_Tests_Verify.robot index 7f7584a..48e3a1c 100644 --- a/01-TestCase/tsg_adc/multi_step/b_BAllow_Http_Tests_Verify.robot +++ b/01-TestCase/tsg_adc/multi_step/b_BAllow_Http_Tests_Verify.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_BAllow_Ssl_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_BAllow_Ssl_Tests_Verify.robot index 0b825c9..039f213 100644 --- a/01-TestCase/tsg_adc/multi_step/b_BAllow_Ssl_Tests_Verify.robot +++ b/01-TestCase/tsg_adc/multi_step/b_BAllow_Ssl_Tests_Verify.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_BAllow_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_BAllow_Tests_Verify.robot index f427d00..a673104 100644 --- a/01-TestCase/tsg_adc/multi_step/b_BAllow_Tests_Verify.robot +++ b/01-TestCase/tsg_adc/multi_step/b_BAllow_Tests_Verify.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot index 82dbbdf..8a7c094 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot @@ -15,7 +15,7 @@ SecurityPolicy-Deny-Http-00001 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00001.bat ... ELSE set variable curl -m 10 -kv http://www.lkong.net/forum.php ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset - ... ELSE Create List Connection was reset + ... ELSE Create List timed out ${rescode} SystemCommands ${commandstr} ${stringlist} Comment 改变阻断策略 ${policyDict} Create Dictionary policyId=${deny_http_policyId} source=${deny_http_objectId35}|TSG_SECURITY_SOURCE_LOCATION policyName=SecurityPolicy-Deny-Http-00001-1 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${deny_http_objectId36}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID} @@ -92,7 +92,7 @@ SecurityPolicy-Deny-Http-00005 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00005.bat ... ELSE set variable curl -m 10 -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' \http://www.abchina.com/cn/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset - ... ELSE Create List Connection was reset + ... ELSE Create List timed out ${rescode} SystemCommands ${commandstr} ${stringlist} SecurityPolicy-Deny-Http-00006 @@ -148,7 +148,7 @@ SecurityPolicy-Deny-Http-00010 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00010.bat ... ELSE set variable curl -m 10 -kv http://www.avaxsearch.com/tangkas/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out - ... ELSE Create List Connection reset by peer + ... ELSE Create List timed out ${rescode} SystemCommands ${commandstr} ${stringlist} Comment 改变阻断策略 ${policyDict} Create Dictionary policyId=${deny_http_policyId9} policyName=SecurityPolicy-Deny-Http-00010_1 destination=24849|TSG_SECURITY_DESTINATION_ADDR policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${deny_http_objectId16}|TSG_FIELD_HTTP_RES_HDR,${deny_http_objectId15}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID} @@ -158,7 +158,7 @@ SecurityPolicy-Deny-Http-00010 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00010.bat ... ELSE set variable curl -m 10 -kv http://www.avaxsearch.com/tangkas/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out - ... ELSE Create List Connection reset by peer + ... ELSE Create List timed out ${rescode} SystemCommands ${commandstr} ${stringlist} SecurityPolicy-Deny-Http-00011 @@ -166,7 +166,7 @@ SecurityPolicy-Deny-Http-00011 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00011.bat ... ELSE set variable curl -m 10 -kv http://www.finestquotes.com/quotesbyauthors.php ${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out - ... ELSE Create List Connection reset by peer + ... ELSE Create List timed out ${rescode} SystemCommands ${commandstr} ${stringlist} SecurityPolicy-Deny-Http-00012 diff --git a/01-TestCase/tsg_adc/multi_step/b_Deny_Mail_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Deny_Mail_Tests.robot index 95f0e35..efafcda 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Deny_Mail_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Deny_Mail_Tests.robot @@ -372,4 +372,20 @@ SecurityPolicy-Deny-Mail-00016 ${rescode} UpdatePolicies 1 ${policyDict} v2 update sleep ${policyModifySleepSeconds} - +SecurityPolicy-Deny-Mail-00017 + Comment 功能端验证 + ${Smtp服务器} Set Variable Smtp.163.com + ${Smtp服务器端口} Set Variable 25 + ${邮箱账号} Set Variable ${mailAccount} + ${邮箱密码} Set Variable ${mailPasswd} + ${邮件主题} Set Variable denymail017 + ${发送者} Set Variable ${mailAccount} + ${附件} Set Variable ["${mailpath}/姬巍川测试文件.txt"] + ${接收者} Set Variable ["${mailAccountGeedge}"] + ${抄送者} Set Variable ["${mailAccountGeedge}"] + ${密送者} Set Variable ["${mailAccountGeedge}"] + ${邮件正文} Set Variable Deny17右匹配测试邮件正文 + ${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件} + Log ${发送邮件返回结果} + run keyword if '${systemType}'=='Windows' should contain ${发送邮件返回结果} mail_fail + ... ELSE should contain ${发送邮件返回结果} fail diff --git a/01-TestCase/tsg_adc/multi_step/b_Deny_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Deny_Tests.robot index 819be2a..832dfe1 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Deny_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Deny_Tests.robot @@ -294,3 +294,14 @@ Proxy-Policy-deny-00018 ${stringlist} run keyword if '${systemType}'=='Windows' Create List Tango Secure Gateway CA ... ELSE Create List Tango Secure Gateway CA ${rescode} SystemCommands ${commandstr} ${stringlist} + +Proxy-Policy-deny-00019 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00019.bat + ... ELSE set variable curl -kv https://www.cndns.com/cn/sms/index.aspx --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Tango Secure Gateway CA Empty reply from server + ... ELSE Create List Tango Secure Gateway CA + ${rescode} SystemCommands ${commandstr} ${stringlist} + + + diff --git a/01-TestCase/tsg_adc/multi_step/b_EDeny_Dns_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_EDeny_Dns_Tests_Verify.robot index 24a43b5..b6c2b29 100644 --- a/01-TestCase/tsg_adc/multi_step/b_EDeny_Dns_Tests_Verify.robot +++ b/01-TestCase/tsg_adc/multi_step/b_EDeny_Dns_Tests_Verify.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_EDeny_Ftp_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_EDeny_Ftp_Tests_Verify.robot index 93dc2ce..b1d7159 100644 --- a/01-TestCase/tsg_adc/multi_step/b_EDeny_Ftp_Tests_Verify.robot +++ b/01-TestCase/tsg_adc/multi_step/b_EDeny_Ftp_Tests_Verify.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_EDeny_Http_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_EDeny_Http_Tests_Verify.robot index fab36d5..c664b05 100644 --- a/01-TestCase/tsg_adc/multi_step/b_EDeny_Http_Tests_Verify.robot +++ b/01-TestCase/tsg_adc/multi_step/b_EDeny_Http_Tests_Verify.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_EDeny_Mail_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_EDeny_Mail_Tests.robot index 3d245b9..99d85ab 100644 --- a/01-TestCase/tsg_adc/multi_step/b_EDeny_Mail_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_EDeny_Mail_Tests.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_EDeny_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_EDeny_Ssl_Tests.robot index 2e0d01a..eb160a6 100644 --- a/01-TestCase/tsg_adc/multi_step/b_EDeny_Ssl_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_EDeny_Ssl_Tests.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_EDeny_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_EDeny_Tests_Verify.robot index 2e644c6..a5ced6e 100644 --- a/01-TestCase/tsg_adc/multi_step/b_EDeny_Tests_Verify.robot +++ b/01-TestCase/tsg_adc/multi_step/b_EDeny_Tests_Verify.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_IHijack_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_IHijack_Tests_Verify.robot index 77508e6..762d5e0 100644 --- a/01-TestCase/tsg_adc/multi_step/b_IHijack_Tests_Verify.robot +++ b/01-TestCase/tsg_adc/multi_step/b_IHijack_Tests_Verify.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_JInsert_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_JInsert_Tests.robot index 3bd7ce2..65d7903 100644 --- a/01-TestCase/tsg_adc/multi_step/b_JInsert_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_JInsert_Tests.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_JIntercept_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_JIntercept_Http_Tests.robot index b0d26ae..e864ce2 100644 --- a/01-TestCase/tsg_adc/multi_step/b_JIntercept_Http_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_JIntercept_Http_Tests.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_JIntercept_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_JIntercept_Ssl_Tests.robot index 00cd459..159aeab 100644 --- a/01-TestCase/tsg_adc/multi_step/b_JIntercept_Ssl_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_JIntercept_Ssl_Tests.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_Monitor_Mail_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Monitor_Mail_Tests.robot index 528c226..e6fb183 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Monitor_Mail_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Monitor_Mail_Tests.robot @@ -375,3 +375,22 @@ SecurityPolicy-Momitor-Mail-00015 Log ${发送邮件返回结果} run keyword if '${systemType}'=='Windows' should contain ${发送邮件返回结果} mail_success ... ELSE should contain ${发送邮件返回结果} success + +SecurityPolicy-Momitor-Mail-00016 + Comment 功能端验证 + ${Smtp服务器} Set Variable smtp.qq.com + ${Smtp服务器端口} Set Variable 25 + ${邮箱账号} Set Variable ${mailqqAccount} + ${邮箱密码} Set Variable ${mailqqPasswd} + ${邮件主题} Set Variable monitorMail16 + ${发送者} Set Variable ${mailqqAccount} + ${附件} Set Variable ["${mailpath}/何冰凝测试文件.txt"] + ${接收者} Set Variable ["${mailAccountGeedge}"] + ${抄送者} Set Variable ["${mailAccountGeedge}"] + ${密送者} Set Variable ["${mailAccountGeedge}"] + ${邮件正文} Set Variable Monitor16右匹配测试邮件正文 + ${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件} + Log ${发送邮件返回结果} + run keyword if '${systemType}'=='Windows' should contain ${发送邮件返回结果} mail_success + ... ELSE should contain ${发送邮件返回结果} success + \ No newline at end of file diff --git a/01-TestCase/tsg_adc/multi_step/b_NMonitor_Ftp_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Ftp_Tests.robot new file mode 100644 index 0000000..16214e6 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Ftp_Tests.robot @@ -0,0 +1,123 @@ +*** Settings *** +Force Tags tsg_adc_wp 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 +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt +*** Test Cases *** +SecurityPolicy-Monitor-Ftp-00001 + # # 新增策略验证 + # 创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=104 appName=ftp protocol=ftp attributeValue={"string": "ftp://192.168.40.158/123zxcvbnm.txt"} + ${Content} Create Dictionary attributeType=string attributeName=content appId=104 appName=ftp protocol=http attributeValue={"string": "crfvtgbyhnuj"} + ${Account} Create Dictionary attributeType=string attributeName=account appId=104 appName=ftp protocol=http attributeValue={"string": "ftpuser"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "104"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip": "${testClentIP}","port": "80","tableName": "TSG_SECURITY_SOURCE_ADDR","addrType": 4,"protocol": "6"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip": "192.168.40.158","port": "80","tableName": "TSG_SECURITY_DESTINATION_ADDR","addrType": 4,"protocol": "6"} + # 合成attributes字典集 + ${attributes} Create List ${url} ${Content} ${Account} ${app_id} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_ftp_objectId13} ${monitor_ftp_objectId14} ${monitor_ftp_objectId15} ${monitor_ftp_policyId} + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Ftp-00002 + # # 新增策略验证 + # 创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=104 appName=ftp protocol=ftp attributeValue={"string": "ftp://192.168.40.158/stamp.txt"} + ${Content} Create Dictionary attributeType=string attributeName=content appId=104 appName=ftp protocol=http attributeValue={"string": "Shandong Province"} + ${Account} Create Dictionary attributeType=string attributeName=account appId=104 appName=ftp protocol=http attributeValue={"string": "ftpuser"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "104"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip": "${testClentIP}","port": "80","tableName": "TSG_SECURITY_SOURCE_ADDR","addrType": 4,"protocol": "6"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip": "192.168.40.158","port": "80","tableName": "TSG_SECURITY_DESTINATION_ADDR","addrType": 4,"protocol": "6"} + # 合成attributes字典集 + ${attributes} Create List ${url} ${Content} ${Account} ${app_id} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_ftp_objectId3} ${monitor_ftp_objectId4} ${monitor_ftp_objectId5} ${monitor_ftp_policyId1} + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + + +SecurityPolicy-Monitor-Ftp-00003 + # # 新增策略验证 + # 创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=104 appName=ftp protocol=ftp attributeValue={"string": "ftp://192.168.40.158/qwert.txt"} + ${Content} Create Dictionary attributeType=string attributeName=content appId=104 appName=ftp protocol=http attributeValue={"string": "花好听的名字"} + ${Account} Create Dictionary attributeType=string attributeName=account appId=104 appName=ftp protocol=http attributeValue={"string": "ftpuser"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "104"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip": "${testClentIP}","port": "80","tableName": "TSG_SECURITY_SOURCE_ADDR","addrType": 4,"protocol": "6"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip": "192.168.40.158","port": "80","tableName": "TSG_SECURITY_DESTINATION_ADDR","addrType": 4,"protocol": "6"} + # 合成attributes字典集 + ${attributes} Create List ${url} ${Content} ${Account} ${app_id} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_ftp_objectId6} ${monitor_ftp_objectId7} ${monitor_ftp_objectId8} ${monitor_ftp_policyId2} + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Ftp-00004 + # # 新增策略验证 + # 创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=104 appName=ftp protocol=ftp attributeValue={"string": "ftp://192.168.40.158/asdfg.txt"} + ${Content} Create Dictionary attributeType=string attributeName=content appId=104 appName=ftp protocol=http attributeValue={"string": "уютных апартаментов"} + ${Account} Create Dictionary attributeType=string attributeName=account appId=104 appName=ftp protocol=http attributeValue={"string": "ftpuser"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "104"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip": "${testClentIP}","port": "80","tableName": "TSG_SECURITY_SOURCE_ADDR","addrType": 4,"protocol": "6"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip": "192.168.40.158","port": "80","tableName": "TSG_SECURITY_DESTINATION_ADDR","addrType": 4,"protocol": "6"} + # 合成attributes字典集 + ${attributes} Create List ${url} ${Content} ${Account} ${app_id} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_ftp_objectId9} ${monitor_ftp_objectId10} ${monitor_ftp_objectId11} ${monitor_ftp_policyId3} + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + + + + diff --git a/01-TestCase/tsg_adc/multi_step/b_NMonitor_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Http_Tests.robot index 6446578..6a1dbb2 100644 --- a/01-TestCase/tsg_adc/multi_step/b_NMonitor_Http_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Http_Tests.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_NMonitor_Mail_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Mail_Tests.robot index d8a1458..127bec3 100644 --- a/01-TestCase/tsg_adc/multi_step/b_NMonitor_Mail_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Mail_Tests.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_NMonitor_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Ssl_Tests.robot index 13202ac..8be2269 100644 --- a/01-TestCase/tsg_adc/multi_step/b_NMonitor_Ssl_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Ssl_Tests.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_NMonitor_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Tests.robot index b557001..efef650 100644 --- a/01-TestCase/tsg_adc/multi_step/b_NMonitor_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Tests.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/b_SReplace_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_SReplace_Tests_Verify.robot index 4d5d340..11fd398 100644 --- a/01-TestCase/tsg_adc/multi_step/b_SReplace_Tests_Verify.robot +++ b/01-TestCase/tsg_adc/multi_step/b_SReplace_Tests_Verify.robot @@ -21,7 +21,6 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot Resource ../../../02-Keyword/tsg_bfapi/Common.robot Library json Library DateTime -Library demjson Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot Library ../../../04-CustomLibrary/Library/VerifyPolicy.py Resource ../../../05-Other/AllFlowCaseVariable.txt diff --git a/01-TestCase/tsg_adc/multi_step/c_Deny_Mail_Test.robot b/01-TestCase/tsg_adc/multi_step/c_Deny_Mail_Test.robot index 2d6067a..7b5f0dc 100644 --- a/01-TestCase/tsg_adc/multi_step/c_Deny_Mail_Test.robot +++ b/01-TestCase/tsg_adc/multi_step/c_Deny_Mail_Test.robot @@ -162,3 +162,12 @@ SecurityPolicy-Deny-Mail-00016 ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_mail_policyId15}]} ${s} Convert to String ${deny_mail_policyId15} +SecurityPolicy-Deny-Mail-00017 + #删除对象 + ${objectids} set Variable ${deny_mail_objectId37} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_mail_objectId38} + #删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_mail_policyId16}]} + ${s} Convert to String ${deny_mail_policyId16} + GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account ${mailAccount} + diff --git a/01-TestCase/tsg_adc/multi_step/c_Deny_Tests.robot b/01-TestCase/tsg_adc/multi_step/c_Deny_Tests.robot index 28ad8b5..5b12861 100644 --- a/01-TestCase/tsg_adc/multi_step/c_Deny_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/c_Deny_Tests.robot @@ -254,3 +254,17 @@ Proxy-Policy-deny-00018 ${policyIds} Create List ${policyId1} ${policyId2} ${s} Convert to String ${deny_policyId16} GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.umusicpub.com + +Proxy-Policy-deny-00019 + #删除对象 + ${objectids} set Variable ${deny_objectId60} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId61} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId62} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId63} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId64} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId18}]} + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId18}]} + ${policyIds} Create List ${policyId1} ${policyId2} + ${s} Convert to String ${deny_policyId18} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.cndns.com diff --git a/01-TestCase/tsg_adc/multi_step/c_Monitor_Mail_Tests.robot b/01-TestCase/tsg_adc/multi_step/c_Monitor_Mail_Tests.robot index a936c12..db1114d 100644 --- a/01-TestCase/tsg_adc/multi_step/c_Monitor_Mail_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/c_Monitor_Mail_Tests.robot @@ -156,3 +156,12 @@ SecurityPolicy-Monitor-Mail-00015 ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_mail_policyId14}]} ${s} Convert to String ${monitor_mail_policyId14} GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account ${mailqqAccount} + +SecurityPolicy-Monitor-Mail-00016 + #删除对象 + ${objectids} set Variable ${monitor_mail_objectId38} + ${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_mail_objectId39} + #删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_mail_policyId15}]} + ${s} Convert to String ${monitor_mail_policyId15} + GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account ${mailqqAccount} diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00019.bat b/05-Other/curl/command/ProxyPolicy_Deny_00019.bat new file mode 100644 index 0000000..13359f4 --- /dev/null +++ b/05-Other/curl/command/ProxyPolicy_Deny_00019.bat @@ -0,0 +1 @@ +curl -kv "https://www.cndns.com/cn/sms/index.aspx" --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" | iconv -f utf-8 -t gbk \ No newline at end of file