summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py
AgeCommit message (Collapse)AuthorFilesLines
2017-10-27divide resources into handlers and modelsSerenaFeng1-449/+0
divide resources into handlers&models put ui handlers into handlers directory put User into user_models.py Change-Id: I3d9e260097205213c3ea8d4eac08b9019e017f71 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-25update scenario nameSerenaFeng1-0/+17
url PUT /api/v1/scenarios/<scenario_name> if new_name already exist, return Forbidden if new_name == name, return Forbidden Change-Id: If3b82b3df4a763d60dad110caca2659c5f39ab50 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-25update installer under scenarioSerenaFeng1-9/+58
1. post, add one or more new installers 2. update, replace existed installers as a totality 3. delete, delete one or more installers by name 4. in post&update, if schema is not consistent with ScenarioInstaller model, BadRequest will be raised(only extra keys will be detected currently) 5. in post, if installer already exist, return Conflict with already exist message 6. in update, if a installer appears more than once, also return Conflict with already exist message Change-Id: I830dba3bcf5f1a9d1c93513b4aae59009f69dc8f Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-25simplify unit tests implementation of update scenarioSerenaFeng1-88/+79
1. delete useless input arguments 2. update on and assert with self.req_d directly delete intermediate variable 'scenario' Change-Id: I3eda1df4893c890bb23ccf05b45ce2de5fa9dd93 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-25update versions under scenarioSerenaFeng1-0/+68
1. post, add one or more new versions 2. update, replace existed version as a totality 3. delete, delete one or more versions by name 4. in post&update, if schema is not consistent with ScenarioVersion model, BadRequest will be raised(only extra keys will be detected currently) 5. in post, if project already exist, return Conflict with already exist message 6. in update, if a version appears more than once, also return Conflict with already exist message 7. add update with conflict unittest for projects Change-Id: I0d2c8a5567f3abce7b0313a64e18303af02cc002 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-24bugfix: fail to generate APIs documentSerenaFeng1-1/+2
Change-Id: I13c91fb34e190cd62400eccec6b755419aad89d1 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-23bugfix: malfunction of scenario equal checkSerenaFeng1-3/+2
1. bugfix equal check with[] will return list[false, true], and always True in next step check 2. in assert_res() leverage '==' will never assert even if they are not equal Change-Id: I683e3489d45b98b508f8ab8b6ef268ca9a1ebd5f Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-21change scenario ownerSerenaFeng1-1/+8
1 bugfix owner must be explicit in ScenarioVersion model 2 change owner of scenario 3. usage: PUT /api/v1/scenarios/<scenario_name>/owner? \ installer=<installer_name>& \ version=<version_name> body: new owner Change-Id: I261468cd8445030b61e37e0f804b699d6205bdb0 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-21update projects in scenarioSerenaFeng1-4/+69
1. post, add one or more new projects 2. update, replace existed projects wholly 3. delete, delete one or more projects by name 4. in post&update, if schema is not consistent with ScenarioProject model, BadRequest will be raised(only extra keys will be detected currently) 5. in post, if project already exist, return Conflict with already exist message Change-Id: Iead585f787a4acc61abce6c9d38a036739b498d6 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-18update customs in scenarioSerenaFeng1-0/+38
1) post to add one or multiple test cases 2) update to substitute all the test cases 3) delete with body to delete one or multiple test cases 4) to facilitate the process and response body usually useless, if update success all updates(scores/trust_indicators/customs), return 200 with no response body Change-Id: I5148f172989fa8e0e70ffed92ee383c0520dbb41 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-17impl update trust_indicator in scenarioSerenaFeng1-0/+11
Change-Id: I1afe38412926778bc84d178dbbfc3fe0cde15f69 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-15update scenario scoresSerenaFeng1-3/+55
update score url: POST /api/v1/scenarios/<scenario_name>/scores? \ installer=<installer_name>& \ version=<version_name>& \ project=<project_name> add new score record interface add unit test add swagger specification Change-Id: Ib7bb31f303a9a9402325476bfdadb58aa0df560e Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-14delete obsolete scenario update codeSerenaFeng1-217/+8
1) update scenario will be subsitituted with new methods, in this patch delete the obsolete code first to make clean room 2) test_queryCombination() will fail randomly, in this patch disable it first, reopen when problem solved Change-Id: I1939876465934ea09894255712057a78f120be71 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-12move resources unit tests to tests/unit/resourcesSerenaFeng1-0/+360
As webportal is introduced, the project structure is becoming more complex, it is time to make it a a little bit more official Change-Id: Id380d37b07719f053b0bd385a326a2f2944a4b22 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>