blob: 52c6822fcb42aeeae50c430d647f9718583e739d [file] [log] [blame]
Guangrong Fu603b27e2017-09-04 18:26:10 +08001*** Settings ***
2Suite Setup
3Suite Teardown Delete All Sessions
4Test Teardown
5Test Timeout
6Library demjson
7Resource Engine-Keywords.robot
8Resource ../RuleMgt/Rule-Keywords.robot
9
10*** Test Cases ***
11verify_invalid_rule
12 [Documentation] Verify a rule with invalid contents.
13 ${dic1} create dictionary content=123123123
14 ${Jsonparam} encode ${dic1}
15 verifyEngineRule ${Jsonparam} -1
16
17verify_valid_rule
18 [Documentation] Verify a rule with valid contents.
19 ${dic2} create dictionary content=package rule03080001
20 ${Jsonparam} encode ${dic2}
21 verifyEngineRule ${Jsonparam}
22
23deploy_invalid_rule
24 [Documentation] Add a rule with invalid contents to the engine.
25 ${dic3} create dictionary content=789789789 engineid=""
26 ${Jsonparam} encode ${dic3}
27 ${response} deployEngineRule ${Jsonparam} -1
28
29deploy_valid_rule
30 [Documentation] Add a rule with valid contents to the engine.
31 ${dic4} create dictionary content=package rule03080002 engineid=""
32 ${Jsonparam} encode ${dic4}
33 ${response} deployEngineRule ${Jsonparam}
34
35delete_existing_rule
36 [Documentation] Delete an existing rule using an existing package ID from the engine.
37 deleteEngineRule rule03080002
38
39delete_non_existing_rule
40 [Documentation] Delete an existing rule using a non-existing package ID from the engine.
41 deleteEngineRule rule03080002 -1