summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/tests/unit
AgeCommit message (Collapse)AuthorFilesLines
2021-03-28Allow verifying testapiCédric Ollivier2-6/+6
It allows running tox vs py27 (epydoc forces py27). It also fixes 2 indent issues. Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: I63e28089a56147b359a72eb330b5badbc6fc7d7f
2018-03-23Merge "Add submitter check for testcase"Serena Feng3-10/+27
2018-03-18Add submitter check for testcasethuva43-10/+27
prevent user(Non submitter) from create, update, delete a testcase tests are added Change-Id: I0c63dea7a6e0d3438802dd8c84e8a752ef7fe3f6 Signed-off-by: thuva4 <tharma.thuva@gmail.com>
2018-03-15delete useless trust_indicator in result modelSerenaFeng2-45/+0
this field aims to mark testcase status in CI evolution, it is a little bit abused, since results is used to save real-time testing result, when CI evolution is talked about again, another collection(let's say testcase_status) will be developed. Change-Id: Id797591a419b097899362ffa82010bff2e6d6cd3 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2018-03-07add too long line check in pep8SerenaFeng4-8/+15
Change-Id: I13bd62699c14bb504751b2e1149de0812b771ba0 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2018-03-01Merge "Prevent to delete the pods"Serena Feng2-0/+49
2018-03-01Prevent to delete the podsthuva42-0/+49
Do not allow to delete pods which are associated with test-results JIRA: RELENG-350 Change-Id: I8cb306d719acebff257048f08bcb981d81c64513 Signed-off-by: thuva4 <tharma.thuva@gmail.com>
2018-02-27Merge "remove deprecated upload-related codes"Serena Feng2-53/+0
2018-02-27Merge "set debug=False to prevent useless tracebacks"Serena Feng1-1/+1
2018-02-26Merge "prevent the delete/update for projects"Serena Feng1-0/+17
2018-02-26remove deprecated upload-related codesSerenaFeng2-53/+0
upload result file is used by dovetail, since now dovetail has leveraged its own cvp repo, and TestAPI is mostly and should be used as a realtime results collecting, no need to keep such function. Change-Id: Ibd56035d5d63020e224a382c8040705f63b63386 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2018-02-26set debug=False to prevent useless tracebacksSerenaFeng1-1/+1
Change-Id: Ide0e00e3aa6ee4a484fd9d1b7c9bc52b598267ea Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2018-02-22prevent the delete/update for projectsthuva41-0/+17
Prevent user from deleting or updating projects which are associated with testcases JIRA: RELENG-335 JIRA: RELENG-336 Change-Id: Ic0a8841a4632329f4b58aeb97cb93a91bacc2b06 Signed-off-by: thuva4 <tharma.thuva@gmail.com>
2018-02-15Add test for deploy result get onethuva41-0/+17
Cover the deploy result get one function & not found in unit test JIRA: RELENG-345 Change-Id: I45e9c9c4feacc73d2c934031656ac063be42a148 Signed-off-by: thuva4 <tharma.thuva@gmail.com>
2018-01-29owner to creatorthuva42-4/+5
Change Owner to creator in pod, projects Add creator in testCase, scenarios Fix issue in e2e testing Change-Id: Ib520eb107dce2ed8fc6fd390f034f500bf4c742a Signed-off-by: thuva4 <tharma.thuva@gmail.com>
2018-01-09Design the scenario create methodSerenaFeng1-0/+37
design scenario create method in modal way. design scenario page. Add,delete for installers,versions, projects, customs, trust indicators and scores are implemented. tests are not included. validations are not added. Change-Id: I999229c00869fcd5a4efa97cb2679a08fc24b271 Signed-off-by: thuva4 <tharma.thuva@gmail.com>
2018-01-04Merge "simplify test_pod.py with eq"Serena Feng2-28/+13
2018-01-04simplify test_pod.py with eqSerenaFeng2-28/+13
Change-Id: I1efd519f877d48499dcd98a420b90a1b5d4c488f Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2018-01-04simplify test_testcase.py using eq and templatesSerenaFeng3-42/+64
Change-Id: If1d1e3e22be0ddbb92f0e3b927ea4e376f0a8c89 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2018-01-04simplify test_results.py with eq() and templates/SerenaFeng2-125/+58
Change-Id: Ibc5066f721b6b3343c2f8cb4ec0b9234960e9cb6 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2018-01-04move scenario tests supporting files to templatesSerenaFeng3-49/+32
Change-Id: I038078ada94dc103b625fa77d6f7fc7e214c8dd7 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2018-01-04Merge "add deployment result collecting interfaces"Serena Feng4-0/+227
2018-01-04Merge "leverage query_by_name decorator to simplify name querying"Serena Feng1-0/+3
2018-01-03add deployment result collecting interfacesSerenaFeng4-0/+227
Change-Id: I5fe50c44e7b36ea45dd1b8632130b30dfe173d0a Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2018-01-02leverage query_by_name decorator to simplify name queryingSerenaFeng1-0/+3
name query is case insensitive and partial match Change-Id: I65a6f5d3aa9411559cb9cf27d0fbd7ec46d4b26f Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-12-25Merge "Implement the CRUD operations for Test cases"Serena Feng2-0/+6
2017-12-23Implement the CRUD operations for Test casesthuva42-0/+6
Created the testcases, testcase pages Remove update, delete buttons in project page. add protractor tests for testcases page. change tabs to spaces Change-Id: Id7d381b13dca4f228bda24fa1abad7c465b5cef7 Signed-off-by: thuva4 <tharma.thuva@gmail.com>
2017-12-06remove useless print snippetSerenaFeng1-1/+0
Change-Id: I3ea4ea202bf2f5cf17ca585ccffbef3265ef7cc0 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-11-23Add filter option in projects pagethuva41-0/+28
Implemented the filter option for the projects by following params. name - Check the project's name. Edit the Error message view. Change-Id: Ib2f0e0ccd9726353dbbedbc44d98747ec8e2d4f9 Signed-off-by: thuva4 <tharma.thuva@gmail.com>
2017-11-16Update and Delete functionalities for projectsthuva42-2/+8
Implemented the update and delete functions for the projects and wrote the e2e tests for the both functions. Change-Id: I917dd9503f145b0dde61dd9970bd855f9711335e Signed-off-by: thuva4 <tharma.thuva@gmail.com>
2017-11-14Create functionality and e2e tests for projectthuva44-17/+38
Implemented the create function for the projects. Wrote the e2e tests for the create function. Change-Id: Iceac650573ca31b6246350c4d60033b42e0ffb0f Signed-off-by: thuva4 <tharma.thuva@gmail.com>
2017-10-27divide resources into handlers and modelsSerenaFeng13-144/+21
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-10-23Merge "allow authentication to be disabled"Serena Feng1-1/+2
2017-10-20allow authentication to be disabledSerenaFeng1-1/+2
in local deployment situation, authentication can be disabled by setting authenticate=False of ui section in config.ini JIRA: RELENG-324 Change-Id: I9157d1723851feb12435033dbdd59035e3eb5777 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-10-20criteria field must be 'PASS/FAIL'SerenaFeng1-1/+8
criteria must be fix with 'PASS/FAIL', case insensitive or else, BADREQUEST exception will be raises JIRA: RELENG-327 Change-Id: Ic648b9d38937fc63924e42cfdf5345cdaa32e1ed Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-09-18Bug Fix: Using library for urlencodeutkarshrai981-19/+18
Changes to method call _set_query Change-Id: I95837df57cc98c21ff5d95d9753269490c025dd3 Signed-off-by: utkarshrai98 <utkarshrai98@gmail.com>
2017-09-16Merge "testing for raise in config.py"Serena Feng1-0/+9
2017-09-12leverage LFID authentication to pod creationSerenaFeng5-22/+99
only valid linux foundation user is allowed to create the new pod add owner field in pods to track the pod creator Change-Id: Icada07152069f7c826bfa6122cb86db8c4e3bf68 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-09-12leverage token_check only when posting resultsSerenaFeng1-68/+6
In this patch begin to consider the LFID authentication, token check only effects results, the permission of other resources(pods/projects...) will be checked by LFID. Change-Id: I20f6f221e3bd75ebf06dcd91012898b913f1d0be Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-09-12testing for raise in config.pyutkarshrai981-0/+9
Change-Id: I3b4f21307af55c8f32332502ddcb9315074b7202 Signed-off-by: utkarshrai98 <utkarshrai98@gmail.com> Testing for the raise in test_config.py Change-Id: Iea7ae53b5eac51d3e3eaf9f23d6e8cd79919f103 Signed-off-by: utkarshrai98 <utkarshrai98@gmail.com>
2017-09-11add case-insensitive for find pods querythuva42-3/+16
Now user can't create the pods with the same name. Just like "Demo" , "deMo" and "demo" Add unit test for case-insensitive query Change-Id: Ifddc7b70a38d8504e5fe105fa5cc1a77bf0e39a9 Signed-off-by: thuva4 <tharma.thuva@gmail.com>
2017-09-04clarify obsoleted test configuration filesSerenaFeng7-83/+3
delete noparam.ini/nosection.ini/notboolean.ini/notint.ini/normal.ini substitute normal.ini with etc/config.ini Change-Id: I7e2fa331736a2f9bf807814416a3118be5f613e5 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 checkSerenaFeng2-5/+4
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>