Guangrong Fu | 603b27e | 2017-09-04 18:26:10 +0800 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Suite Setup |
| 3 | Suite Teardown Delete All Sessions |
| 4 | Test Teardown |
| 5 | Test Timeout |
| 6 | Library demjson |
| 7 | Resource Engine-Keywords.robot |
| 8 | Resource ../RuleMgt/Rule-Keywords.robot |
| 9 | |
| 10 | *** Test Cases *** |
| 11 | verify_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 | |
| 17 | verify_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 | |
| 23 | deploy_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 | |
| 29 | deploy_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 | |
| 35 | delete_existing_rule |
| 36 | [Documentation] Delete an existing rule using an existing package ID from the engine. |
| 37 | deleteEngineRule rule03080002 |
| 38 | |
| 39 | delete_non_existing_rule |
| 40 | [Documentation] Delete an existing rule using a non-existing package ID from the engine. |
| 41 | deleteEngineRule rule03080002 -1 |