补充了无效测试,完善了有效测试

This commit is contained in:
dongxiaoyan
2020-07-27 17:42:07 +08:00
parent 223939431e
commit 7f7a03a7c6

View File

@@ -34,8 +34,37 @@ DLL-DeviceID-SecurityPolicy-Deny-Http-00001
... ELSE set variable curl http://webalta.ru/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection reset by peer
${rescode} SystemCommands ${commandstr} ${stringlist}
${endtime} Get Time
Sleep ${policyLogVerificationSleepSeconds}s
#鏃ュ織楠岃瘉
${s} Convert to String ${policyId}
GetLogList security_event_log ${deny_http_starttime} ${deny_http_endtime} ${testClentIP} ${s} http_host webalta.ru
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host webalta.ru
DLL-DeviceID-SecurityPolicy-Deny-Http-00002
[Tags] fqdn
Comment 鍒涘缓fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$webalta.ru
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectids} set Variable ${objectId}
#鍒涘缓 Deny 鎼厤Allow
Comment 鍒涘缓瀹夊叏绛栫暐
${policyDict} Create Dictionary policyName=DLL-DeviceID-SecurityPolicy-Deny-Http-000021 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} effectiveRange=device_1 filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyIds1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
${policyIds} Create List ${policyIds1}
${starttime} Get Time
#鍔熻兘绔獙璇<E78D99>
Sleep ${policyVerificationSleepSeconds}s
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00001.bat
... ELSE set variable curl http://webalta.ru/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection reset by peer
${emptyList} Create List
${rescode} SystemCommandReturnCompare ${commandstr} ${emptyList} ${stringlist}
${endtime} Get Time
Sleep ${policyLogVerificationSleepSeconds}s
#鏃ュ織楠岃瘉
${s} Convert to String ${policyId}
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host webalta.ru