blob: 5a8e81146c320ff8ad7fb0960d581432ef47a3e0 [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001*** 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;\n\nimport java.util.Locale; engineId="" loopControlName=test
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