从公共参数删除版本路径,修改部分不正确路径引用
This commit is contained in:
@@ -11,7 +11,7 @@ Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/decryption
|
||||
${url} /v1/policy/profile/decryption
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -10,7 +10,7 @@ Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/responsepages
|
||||
${url} /v1/policy/profile/responsepages
|
||||
${profiledId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -10,7 +10,7 @@ Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/responsepages
|
||||
${url} /v1/policy/profile/responsepages
|
||||
${profiledId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -11,7 +11,7 @@ Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/hijackfiles
|
||||
${url} /v1/policy/profile/hijackfiles
|
||||
${profiledId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -11,7 +11,7 @@ Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/hijackfiles
|
||||
${url} /v1/policy/profile/hijackfiles
|
||||
${profiledId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -11,7 +11,7 @@ Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/insertscripts
|
||||
${url} /v1/policy/profile/insertscripts
|
||||
${profiledId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -11,7 +11,7 @@ Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/insertscripts
|
||||
${url} /v1/policy/profile/insertscripts
|
||||
${profiledId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -11,7 +11,7 @@ Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/responsepages
|
||||
${url} /v1/policy/profile/responsepages
|
||||
${profiledId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -11,7 +11,7 @@ Library Custometest
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/keyringobj
|
||||
${url} /v1/policy/profile/keyringobj
|
||||
${keyringId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
*** Settings ***
|
||||
Resource ../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../02-Keyword/tsg_bfapi/Filter.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Filter.robot
|
||||
|
||||
*** Test Cases ***
|
||||
File_integrity_rate-1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
*** Settings ***
|
||||
Resource ../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../02-Keyword/tsg_bfapi/Filter.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Filter.robot
|
||||
|
||||
*** Test Cases ***
|
||||
File_size-1
|
||||
|
||||
@@ -7,7 +7,6 @@ Library Selenium2Library
|
||||
Library RequestsLibrary
|
||||
Library Collections
|
||||
Library string
|
||||
Library REST http://${host}:${port}/${version}
|
||||
Library json
|
||||
|
||||
*** Test Cases ***
|
||||
@@ -19,7 +18,7 @@ CountLog-001
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -33,7 +32,7 @@ CountLog-002
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -47,7 +46,7 @@ CountLog-003
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -61,7 +60,7 @@ CountLog-004
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -75,7 +74,7 @@ CountLog-005
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -89,7 +88,7 @@ CountLog-006
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -103,7 +102,7 @@ CountLog-007
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","condaiapi-logaa tions":[${condition}]}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -117,7 +116,7 @@ CountLog-008
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -131,7 +130,7 @@ CountLog-009
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -145,7 +144,7 @@ CountLog-010
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -159,7 +158,7 @@ CountLog-011
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -173,7 +172,7 @@ CountLog-012
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -187,7 +186,7 @@ CountLog-013
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -201,7 +200,7 @@ CountLog-014
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -215,7 +214,7 @@ CountLog-015
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -229,7 +228,7 @@ CountLog-016
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -243,7 +242,7 @@ CountLog-017
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -257,7 +256,7 @@ CountLog-018
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -271,7 +270,7 @@ CountLog-019
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -285,7 +284,7 @@ CountLog-020
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -299,7 +298,7 @@ CountLog-021
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -313,7 +312,7 @@ CountLog-022
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -327,7 +326,7 @@ CountLog-023
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -341,7 +340,7 @@ CountLog-024
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -355,7 +354,7 @@ CountLog-025
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
|
||||
@@ -5,7 +5,7 @@ Resource ../../../02-Keyword/tsg_bfapi/Log_keyword.robot
|
||||
|
||||
*** Variables ***
|
||||
@{logType} security_event_log proxy_event_log connection_record_log radius_record_log
|
||||
|
||||
${path} http://${host}:${port}/${version}
|
||||
*** Test Cases ***
|
||||
ExportLog-001
|
||||
${conditions} Set Variable {"field":"common_log_id","type":"long","symbol":"=","value":["59526984506148866"] }
|
||||
|
||||
@@ -7,7 +7,7 @@ Library Collections
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Log_schema.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Log_search.robot
|
||||
Library string
|
||||
Library REST http://${host}:${port}/${version}
|
||||
Library REST http://${host}:${port}
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Log_keyword.robot
|
||||
|
||||
*** Test Cases ***
|
||||
@@ -17,7 +17,7 @@ log-schema-001
|
||||
|
||||
log-search-002
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} []
|
||||
log ${response}
|
||||
@@ -25,7 +25,7 @@ log-search-002
|
||||
|
||||
log-search-003
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable {"field":"common_log_id","type":"long","symbol":"=","value":["59526984506148866"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
@@ -39,7 +39,7 @@ log-search-003
|
||||
|
||||
log-search-004
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"=", "value":["2020-04-27 12:48:33"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
@@ -53,7 +53,7 @@ log-search-004
|
||||
|
||||
log-search-005
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"=", "value":["774"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
@@ -67,7 +67,7 @@ log-search-005
|
||||
|
||||
log-search-006
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"ad_cc_target_url", "type":"string", "symbol":"sub", "value":["www.jianshu.com"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
@@ -81,7 +81,7 @@ log-search-006
|
||||
|
||||
log-search-007
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"sub", "value":["22"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
@@ -95,7 +95,7 @@ log-search-007
|
||||
|
||||
log-search-008
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"prefix", "value":["10"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
@@ -109,7 +109,7 @@ log-search-008
|
||||
|
||||
log-search-009
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"suffix", "value":["222"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
@@ -123,7 +123,7 @@ log-search-009
|
||||
|
||||
log-search-010
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"exactly", "value":["10.3.22.222"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
@@ -137,7 +137,7 @@ log-search-010
|
||||
|
||||
log-search-011
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"exactly", "value":["10.3.22.222"] },{"field":"common_log_id","type":"long","symbol":"=","value":["59526984506148866"] },{ "field":"common_recv_time", "type":"timestamp", "symbol":"=", "value":["2020-04-27 13:27:02"] },{ "field":"common_policy_id", "type":"int", "symbol":"=", "value":["95"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
@@ -160,7 +160,7 @@ log-search-012
|
||||
${simpleCondition} Set Variable "common_server_ips": "40"
|
||||
${logCondition} GetLogCondition active_defence_event_log 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
... ${conditions}
|
||||
${response} BasePostRequest v1/log/list ${logCondition}
|
||||
${response} BasePostRequest /${version}/log/list ${logCondition}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
${responsedata} Get From Dictionary ${response} data
|
||||
log ${responsedata}
|
||||
@@ -170,7 +170,7 @@ log-search-012
|
||||
|
||||
log-search-013
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "value":["774"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
@@ -184,7 +184,7 @@ log-search-013
|
||||
|
||||
log-search-014
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"!=", "value":["774"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
@@ -193,7 +193,7 @@ log-search-014
|
||||
|
||||
log-search-015
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":">", "value":["774"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
@@ -202,7 +202,7 @@ log-search-015
|
||||
|
||||
log-search-016
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"<", "value":["774"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
@@ -211,7 +211,7 @@ log-search-016
|
||||
|
||||
log-search-017
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"<=", "value":["774"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
@@ -220,7 +220,7 @@ log-search-017
|
||||
|
||||
log-search-018
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":">=", "value":["774"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
@@ -229,7 +229,7 @@ log-search-018
|
||||
|
||||
log-search-019
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"in", "value":["774","95"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
@@ -238,7 +238,7 @@ log-search-019
|
||||
|
||||
log-search-020
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "value":["2020-04-27 12:48:33"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
@@ -252,7 +252,7 @@ log-search-020
|
||||
|
||||
log-search-021
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":">", "value":["2020-04-27 12:48:33"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
@@ -261,7 +261,7 @@ log-search-021
|
||||
|
||||
log-search-022
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"<", "value":["2020-04-27 12:48:33"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
@@ -270,7 +270,7 @@ log-search-022
|
||||
|
||||
log-search-023
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"<=", "value":["2020-04-27 12:48:33"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
@@ -284,7 +284,7 @@ log-search-023
|
||||
|
||||
log-search-024
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":">=", "value":["2020-04-27 12:48:33"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
@@ -293,7 +293,7 @@ log-search-024
|
||||
|
||||
log-search-025
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"between", "value":["2020-04-27 12:48:33","2020-04-27 13:27:03"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
@@ -302,7 +302,7 @@ log-search-025
|
||||
|
||||
log-search-026
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "value":["2020-04-27 12:48:33","2020-04-27 13:27:03"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
|
||||
@@ -10,7 +10,7 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywor
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/decryption
|
||||
${url} /v1/policy/profile/decryption
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -11,24 +11,28 @@ Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/hijackfiles
|
||||
${url} /v1/policy/profile/hijackfiles
|
||||
${profileId} ${EMPTY}
|
||||
*** Keywords ***
|
||||
ProfileComman
|
||||
[Arguments] ${objectedit} ${type}
|
||||
${default_json} ${default_files} ${default_url} Run Keyword If "${type}"=="hijack" Set Variable ${setting_proxy_profiles_hijack} hijack_files/ /policy/profile/hijackfiles
|
||||
[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} ${objectDict}
|
||||
${response} CreatePolicyFile4 ${default_url} ${default_files} ${fileName} ${objectDict}
|
||||
#${url} ${filePath} ${fileName} ${objectDict}
|
||||
[Return] ${response}
|
||||
*** Test Cases ***
|
||||
Hijack_file_24_type-test
|
||||
Hijack_file_24_type-apk
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=Hijack_file_24_type-00000 contentName=Create-Hijack Files-test-0.apk contentType=application/vnd.android.package-archive
|
||||
${response} ProfileComman ${objectedit} 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 需要修改的内容
|
||||
|
||||
@@ -9,7 +9,7 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywor
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/exch/intermediacert
|
||||
${url} /v1/policy/exch/intermediacert
|
||||
|
||||
*** Test Cases ***
|
||||
Intermedia Cert Policy case
|
||||
|
||||
@@ -10,7 +10,7 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywor
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/trafficmirror
|
||||
${url} /v1/policy/profile/trafficmirror
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -11,7 +11,7 @@ Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} policy/profile/claimedsrcip
|
||||
${url} /v1/policy/profile/claimedsrcip
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -18,7 +18,7 @@ Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/decryption
|
||||
${url} /v1/policy/profile/decryption
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -11,7 +11,7 @@ Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/dnsrecords
|
||||
${url} /v1/policy/profile/dnsrecords
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -9,7 +9,7 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/Functional
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/exch/intermediacert
|
||||
${url} /v1/policy/exch/intermediacert
|
||||
|
||||
*** Test Cases ***
|
||||
IntermediaCertPolicy-00001
|
||||
|
||||
@@ -11,7 +11,7 @@ Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} policy/profile/reflector
|
||||
${url} /v1/policy/profile/reflector
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -11,7 +11,7 @@ Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} policy/profile/reflector/payload
|
||||
${url} /v1/policy/profile/reflector/payload
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -21,7 +21,7 @@ Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/trafficmirror
|
||||
${url} /v1/policy/profile/trafficmirror
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -7,7 +7,7 @@ Resource ../../03-Variable/BifangApiVariable.txt
|
||||
Post-Request
|
||||
[Arguments] ${url} ${data}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
Create Session api http://${host}:${port}/${version} headers=${header}
|
||||
Create Session api http://${host}:${port} headers=${header}
|
||||
${remoteResponse} Post Request api ${url} data=${data} headers=${header}
|
||||
${response} to json ${remoteResponse.content}
|
||||
Should Be Equal As Strings ${remoteResponse.status_code} 200
|
||||
@@ -16,7 +16,7 @@ Post-Request
|
||||
Get-Request
|
||||
[Arguments] ${url}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
Create Session api http://${host}:${port}/${version} headers=${header}
|
||||
Create Session api http://${host}:${port} headers=${header}
|
||||
${remoteResponse} Get Request api ${url} headers=${header}
|
||||
${response} to json ${remoteResponse.content}
|
||||
Should Be Equal As Strings ${remoteResponse.status_code} 200
|
||||
@@ -25,7 +25,7 @@ Get-Request
|
||||
Delete-Request
|
||||
[Arguments] ${url} ${data}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
Create Session api http://${host}:${port}/${version} headers=${header}
|
||||
Create Session api http://${host}:${port} headers=${header}
|
||||
${remoteResponse} Delete Request api ${url} data=${data} headers=${header}
|
||||
${response} to json ${remoteResponse.content}
|
||||
Should Be Equal As Strings ${remoteResponse.status_code} 200
|
||||
@@ -34,7 +34,7 @@ Delete-Request
|
||||
UpFilePostRequest
|
||||
[Arguments] ${url} ${data} ${files} ${fileDesc}
|
||||
${header} Set To Dictionary ${fileDesc} Authorization=${token}
|
||||
Create Session api http://${host}:${port}/${version} headers=${header}
|
||||
Create Session api http://${host}:${port} headers=${header}
|
||||
${remoteResponse} Post Request api ${url} data=${data} files=${files} headers=${header}
|
||||
${response} to json ${remoteResponse.content}
|
||||
Should Be Equal As Strings ${remoteResponse.status_code} 200
|
||||
@@ -43,7 +43,7 @@ UpFilePostRequest
|
||||
UpFilePutRequest
|
||||
[Arguments] ${url} ${data} ${files} ${fileDesc}
|
||||
${header} Set To Dictionary ${fileDesc} Authorization=${token}
|
||||
Create Session api http://${host}:${port}/${version} headers=${header}
|
||||
Create Session api http://${host}:${port} headers=${header}
|
||||
${remoteResponse} Put Request api ${url} params=${data} files=${files} headers=${header}
|
||||
${response} to json ${remoteResponse.content}
|
||||
Should Be Equal As Strings ${remoteResponse.status_code} 200
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
*** Settings ***
|
||||
Resource ../../03-Variable/BifangApiVariable.txt
|
||||
Library REST http://${host}:${port}/${version}
|
||||
Library REST http://${host}:${port}
|
||||
Library Collections
|
||||
Library RequestsLibrary
|
||||
|
||||
@@ -48,7 +48,7 @@ BasePostRequestForV2
|
||||
BaseGetRequest
|
||||
[Arguments] ${apistr} ${body}
|
||||
Set Headers {"Authorization":"${token}","Content-Type":"application/json"}
|
||||
&{httpResponse} Get ${apistr}?${body}
|
||||
&{httpResponse} Get /${apistr}?${body}
|
||||
#Output response body
|
||||
Object response body
|
||||
#Integer $.code 200
|
||||
@@ -67,7 +67,7 @@ BaseGetRequestForV2
|
||||
BaseDeleteRequest
|
||||
[Arguments] ${requestUri} ${data}
|
||||
${headers} set variable {"Authorization":"${token}","Content-Type":"application/json"}
|
||||
create session api http://${host}:${port}/${version} ${headers}
|
||||
create session api http://${host}:${port} ${headers}
|
||||
${response}= Delete Request api ${requestUri} data=${data}
|
||||
log return data =${response}
|
||||
Should Be Equal As Strings ${response.status_code} 200
|
||||
@@ -77,7 +77,7 @@ BaseDeleteRequest
|
||||
BaseEditRequest
|
||||
[Arguments] ${requestUri} ${data}
|
||||
${headers} set variable {"Authorization":"${token}","Content-Type":"application/json"}
|
||||
create session api http://${host}:${port}/${version} ${headers}
|
||||
create session api http://${host}:${port} ${headers}
|
||||
${response}= Put Request api ${requestUri} data=${data}
|
||||
log return data =${response}
|
||||
Should Be Equal As Strings ${response.status_code} 200
|
||||
|
||||
@@ -10,7 +10,7 @@ Library REST http://${host}:${port}
|
||||
GetLogCondition
|
||||
[Arguments] ${logname} ${startTime} ${endTime} ${client_ip} ${policy_id}
|
||||
Set Headers {"Content-Type":"application/x-www-form-urlencoded","Authorization":"${token}"}
|
||||
&{LogSchemaResponse}= GET /log/schema?logType=${logname}
|
||||
&{LogSchemaResponse}= GET /${version}/log/schema?logType=${logname}
|
||||
log ${logname}
|
||||
#Output Schema response body
|
||||
Object response body
|
||||
@@ -35,7 +35,7 @@ PostRemoteData
|
||||
GetALLLogCondition
|
||||
[Arguments] ${logname} ${startTime} ${endTime} ${client_ip} ${policy_id} ${pageSize} ${pageNo}
|
||||
Set Headers {"Content-Type":"application/x-www-form-urlencoded","Authorization":"${token}"}
|
||||
&{LogSchemaResponse}= GET /log/schema?logType=${logname}
|
||||
&{LogSchemaResponse}= GET /${version}/log/schema?logType=${logname}
|
||||
log ${logname}
|
||||
#Output Schema response body
|
||||
Object response body
|
||||
@@ -53,7 +53,7 @@ GetALLLogCondition
|
||||
GetLogCountConditon
|
||||
[Arguments] ${logname} ${startTime} ${endTime} ${client_ip} ${policy_id} ${pageSize} ${pageNo}
|
||||
Set Headers {"Content-Type":"application/x-www-form-urlencoded","Authorization":"${token}"}
|
||||
&{LogSchemaResponse}= GET /log/schema?logType=${logname}
|
||||
&{LogSchemaResponse}= GET /${version}/log/schema?logType=${logname}
|
||||
log ${logname}
|
||||
#Output Schema response body
|
||||
Object response body
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
*** Settings ***
|
||||
Resource ../../03-Variable/BifangApiVariable.txt
|
||||
Resource LogSchema.robot
|
||||
Library REST http://${host}:${port}/${version}
|
||||
Library REST http://${host}:${port}
|
||||
Library RequestsLibrary
|
||||
Library OperatingSystem
|
||||
Library Collections
|
||||
@@ -12,7 +12,7 @@ GetLogList
|
||||
[Arguments] ${logType} ${startTime} ${endTime} ${client_ip} ${policy_id} ${parmkey} ${parmvalue}
|
||||
${logCondition} GetLogCondition ${logType} ${startTime} ${endTime} ${client_ip} ${policy_id}
|
||||
log ${logCondition}
|
||||
${LogListResponse} PostRemoteData /log/list ${logCondition}
|
||||
${LogListResponse} PostRemoteData /${version}/log/list ${logCondition}
|
||||
Should Be Equal As Strings ${LogListResponse.status_code} 200
|
||||
${returnData} To Json ${LogListResponse.content}
|
||||
${responseCode} Get From Dictionary ${returnData} code
|
||||
@@ -40,7 +40,7 @@ GetLogListSize
|
||||
[Arguments] ${logType} ${startTime} ${endTime} ${client_ip} ${policy_id} ${parmkey} ${parmvalue}
|
||||
${logCondition} GetALLLogCondition ${logType} ${startTime} ${endTime} ${client_ip} ${policy_id} 10000 1
|
||||
log ${logCondition}
|
||||
${LogListResponse} PostRemoteData /log/list ${logCondition}
|
||||
${LogListResponse} PostRemoteData /${version}/log/list ${logCondition}
|
||||
Should Be Equal As Strings ${LogListResponse.status_code} 200
|
||||
${returnData} To Json ${LogListResponse.content}
|
||||
${data} Get From Dictionary ${returnData} data
|
||||
@@ -51,7 +51,7 @@ GetLogListSize
|
||||
GetLogCount
|
||||
[Arguments] ${logType} ${startTime} ${endTime} ${client_ip} ${policy_id} ${parmkey} ${parmvalue}
|
||||
${logCondition} GetALLLogCondition ${logType} ${startTime} ${endTime} ${client_ip} ${policy_id} 10000 1
|
||||
${LogListResponse} PostRemoteData /log/count ${logCondition}
|
||||
${LogListResponse} PostRemoteData /${version}/log/count ${logCondition}
|
||||
Should Be Equal As Strings ${LogListResponse.status_code} 200
|
||||
${returnData} To Json ${LogListResponse.content}
|
||||
${len} Set Variable ${LogListResponse.json()}[data][total]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
*** Settings ***
|
||||
Resource ../../03-Variable/BifangApiVariable.txt
|
||||
Library REST http://${host}:${port}/${version}
|
||||
Library REST http://${host}:${port}
|
||||
Library Collections
|
||||
Library SSHLibrary
|
||||
Resource PolicyObject.robot
|
||||
@@ -13,7 +13,7 @@ Login
|
||||
[Tags] tsg_adc tsg_bf_api
|
||||
#[Arguments] ${username} ${password} ${authmode} ${authCode} ${ldapId}
|
||||
# 毕方接口用户名密码
|
||||
GET /user/encryptpwd?password=${password}
|
||||
GET /${version}/user/encryptpwd?password=${password}
|
||||
Object response body
|
||||
#OUTPUT response body
|
||||
#${rescode} Integer $.code
|
||||
@@ -33,7 +33,7 @@ Login
|
||||
#getToken##################################################################################
|
||||
#log ${username}
|
||||
#log ${pwdstr}
|
||||
POST /user/login?username=${username}&password=${encodePassword}&authMode=${authmode}
|
||||
POST /${version}/user/login?username=${username}&password=${encodePassword}&authMode=${authmode}
|
||||
Object response body
|
||||
#OUTPUT response body
|
||||
Integer $.code 200
|
||||
@@ -51,7 +51,7 @@ Login
|
||||
|
||||
Logout
|
||||
[Tags] tsg_adc tsg_bf_api
|
||||
POST /user/logout headers=${headers}
|
||||
POST /${version}/user/logout headers=${headers}
|
||||
Object response body
|
||||
Integer $.code 200
|
||||
${rescode} Integer $.code
|
||||
|
||||
@@ -3,7 +3,7 @@ Resource ../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../tsg_common/ManagePolicyBody.robot
|
||||
Resource ../tsg_common/ManageObjectBody.robot
|
||||
Resource ../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot
|
||||
Library REST http://${host}:${port}/${version}
|
||||
Library REST http://${host}:${port}
|
||||
Library Collections
|
||||
Library RequestsLibrary
|
||||
Resource Common.robot
|
||||
@@ -52,17 +52,17 @@ AddLocalIPObject
|
||||
|
||||
DelLocalIPObject
|
||||
log to_DelLocalIPObject
|
||||
${response} BaseDeleteRequest /policy/object {"objectIds":[${testClentID}]}
|
||||
${response} BaseDeleteRequest /${version}/policy/object {"objectIds":[${testClentID}]}
|
||||
#${response_code} Get From Dictionary ${response} code
|
||||
#Should Be Equal As Strings ${response} {'code': 200, 'msg': 'Success', 'success': True}
|
||||
SET GLOBAL VARIABLE ${testClentID} ${EMPTY}
|
||||
${response} BaseDeleteRequest /policy/object {"objectIds":[${testClentSubID}]}
|
||||
${response} BaseDeleteRequest /${version}/policy/object {"objectIds":[${testClentSubID}]}
|
||||
SET GLOBAL VARIABLE ${testClentSubID} ${EMPTY}
|
||||
|
||||
AddObject
|
||||
[Arguments] ${body}
|
||||
#addIPobject#################################################################################
|
||||
${response} BasePostRequest /policy/object body=${body}
|
||||
${response} BasePostRequest /${version}/policy/object body=${body}
|
||||
#log ${response}
|
||||
${objectId} Set Variable ${response['data']['objectList'][0]['objectId']}
|
||||
${rescodeReturn} Set Variable ${response['code']}
|
||||
@@ -72,7 +72,7 @@ AddObject2
|
||||
[Arguments] ${returnData} ${objectList}
|
||||
${body} ObjectParamsOpertion ${returnData} ${objectList} add
|
||||
|
||||
${response} BasePostRequest /policy/object body=${body}
|
||||
${response} BasePostRequest /${version}/policy/object body=${body}
|
||||
${objectId} Set Variable ${response['data']['objectList'][0]['objectId']}
|
||||
${rescodeReturn} Set Variable ${response['code']}
|
||||
[Return] ${rescodeReturn} ${objectId}
|
||||
@@ -80,7 +80,7 @@ AddObject2
|
||||
EditObject
|
||||
[Arguments] ${objectList} ${opAction}
|
||||
${body} ObjectParamsOpertion ${0} ${objectList} ${opAction}
|
||||
${response} BaseEditRequest /policy/object ${body}
|
||||
${response} BaseEditRequest /${version}/policy/object ${body}
|
||||
${rescodeReturn} Set Variable ${response['code']}
|
||||
[Return] ${rescodeReturn}
|
||||
|
||||
@@ -99,14 +99,14 @@ DeleteObjectbak
|
||||
|
||||
AddPolicy
|
||||
[Arguments] ${body}
|
||||
${response} BasePostRequest V2/policy/compile body=${body}
|
||||
${response} BasePostRequest /${version}/policy/compile body=${body}
|
||||
#log ${response}
|
||||
${policyId} Set Variable ${response['data']['policyList'][0]['policyId']}
|
||||
${rescode} Set Variable ${response['code']}
|
||||
[Return] ${rescode} ${policyId}
|
||||
QueryPolicy
|
||||
[Arguments] ${body}
|
||||
${response} BaseGetRequest /policy/compile body=${body}
|
||||
${response} BaseGetRequest /${version}/policy/compile body=${body}
|
||||
#log ${response}
|
||||
${rescode} Set Variable ${response['code']}
|
||||
[Return] ${rescode} ${response}
|
||||
@@ -114,7 +114,7 @@ AddPolicy2
|
||||
[Arguments] ${returnData} ${policyList}
|
||||
${body} PolicyParamsOpertion ${returnData} ${policyList} add
|
||||
|
||||
${response} BasePostRequest /policy/compile body=${body}
|
||||
${response} BasePostRequest /${version}/policy/compile body=${body}
|
||||
${policyId} Set Variable ${response['data']['policyList'][0]['policyId']}
|
||||
${rescode} Set Variable ${response['code']}
|
||||
[Return] ${rescode} ${policyId}
|
||||
@@ -125,7 +125,7 @@ AddPolicy2006
|
||||
${body} json.Dumps ${objectDict}
|
||||
#${body} PolicyParamsOpertion ${returnData} ${policyList} add
|
||||
|
||||
${response} BasePostRequest /policy/compile body=${body}
|
||||
${response} BasePostRequest /${version}/policy/compile body=${body}
|
||||
${policyId} Set Variable ${response['data']['policyList'][0]['policyId']}
|
||||
${rescode} Set Variable ${response['code']}
|
||||
[Return] ${rescode} ${policyId}
|
||||
@@ -138,14 +138,14 @@ EditPolicy
|
||||
#disable:表示停用,只修改isValid属性为0
|
||||
#enable:表示启用,只修改isValid属性为1
|
||||
${body} PolicyParamsOpertion ${0} ${policyList} ${opAction}
|
||||
${response} BaseEditRequest /policy/compile ${body}
|
||||
${response} BaseEditRequest /${version}/policy/compile ${body}
|
||||
${rescode} Set Variable ${response['code']}
|
||||
[Return] ${rescode} ${response}
|
||||
|
||||
DeletePolicybak
|
||||
[Arguments] ${policyids}
|
||||
${body} String {"policyType":"tsg_security","policyIds":[${policyids}]}
|
||||
DELETE /policy/compile body=${body} headers=${headers}
|
||||
DELETE /${version}/policy/compile body=${body} headers=${headers}
|
||||
Object response body
|
||||
log DeletePolicy
|
||||
Output response body
|
||||
@@ -157,7 +157,7 @@ DeletePolicy
|
||||
[Arguments] ${body}
|
||||
#删除策略
|
||||
log toDeletePolicy_DeletePolicyDeletePolicy
|
||||
${response} BaseDeleteRequest /policy/compile ${body}
|
||||
${response} BaseDeleteRequest /${version}/policy/compile ${body}
|
||||
#{"policyType":"tsg_security","policyIds":[${policyids}]}
|
||||
${response_code} Get From Dictionary ${response} code
|
||||
Should Be Equal As Strings ${response_code} 200
|
||||
@@ -169,7 +169,7 @@ DeleteObject
|
||||
[Arguments] ${objectids}
|
||||
#删除对象
|
||||
log todeleteobj
|
||||
${response} BaseDeleteRequest /policy/object {"objectIds":[${objectids}]}
|
||||
${response} BaseDeleteRequest /${version}/policy/object {"objectIds":[${objectids}]}
|
||||
${response_code} Get From Dictionary ${response} code
|
||||
#log aaaaaaaaaa:${response_code}
|
||||
Should Be Equal As Strings ${response_code} 200
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
*** Settings ***
|
||||
Resource ../../03-Variable/BifangApiVariable.txt
|
||||
Library REST http://${host}:${port}/${version}
|
||||
Library REST http://${host}:${port}
|
||||
Library Collections
|
||||
Library RequestsLibrary
|
||||
Resource Common.robot
|
||||
@@ -9,7 +9,7 @@ Resource Common.robot
|
||||
ApiAddTags
|
||||
[Arguments] ${body}
|
||||
#ApiAddTags#################################################################################
|
||||
${response} BasePostRequest /customize/tags body=${body}
|
||||
${response} BasePostRequest /${version}/customize/tags body=${body}
|
||||
#log ${response}
|
||||
${tagId} Set Variable ${response['data']['tagList'][0]['id']}
|
||||
${rescodeReturn} Set Variable ${response['code']}
|
||||
@@ -23,7 +23,7 @@ ApiDeleteTags
|
||||
[Arguments] ${body}
|
||||
#删除策略
|
||||
log toApiDeleteTags
|
||||
${response} BaseDeleteRequest /customize/tags ${body}
|
||||
${response} BaseDeleteRequest /${version}/customize/tags ${body}
|
||||
${response_code} Get From Dictionary ${response} code
|
||||
Should Be Equal As Strings ${response_code} 200
|
||||
${response} Convert to String ${response}
|
||||
|
||||
Reference in New Issue
Block a user