summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi
AgeCommit message (Collapse)AuthorFilesLines
2017-05-17refactor static_path to accomodate web portalSerenaFeng38-72/+72
move tornado_swagger/static to opnfv_testapi/static move swagger related 3rd libs to 3rd_party/swagger Change-Id: I32bba10584c99d13687b93f32577e37581db0c63 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-05-17Merge "bugfix: /resources.json and /APIs cannot be accessed"Morgan Richomme2-5/+3
2017-05-16bugfix: /resources.json and /APIs cannot be accessedSerenaFeng2-5/+3
1. change the join way of discover_url 2. limit tornado version not to use latest 4.5 Change-Id: I39dfd3b32bf232a7c144087bc9d5f88fb6798ee7 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-05-12refactor config parser to facilitate adding new configsSerenaFeng3-100/+40
refactor hardcoded config.py to facilitate adding new configurations come along with web portal and Authentication features Change-Id: Ibc16166ade0d6e730bb4c9d81e9b9bc9b297faa1 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-05-12add web portal framework for TestAPISerenaFeng340-1/+85415
Change-Id: I62cea8b59ffe6a6cde98051c130f4502c07d3557 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-05-11clarify schema base on swagger1.2 specificationSerenaFeng1-3/+3
Change-Id: I98e165ae943b54d6a38783f2a3822d381c247ee4 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-05-11Merge "leverage tornado framework to simply impl of TestAPI"Serena Feng4-35/+37
2017-05-11Merge "correct the import impl of TestAPI"Serena Feng13-53/+55
2017-05-11Merge "change swagger urls based on v1.2 specification"Serena Feng3-10/+11
2017-05-10Add short_description field to testcase in test APIMorgan Richomme1-6/+9
this field will be used for the catalogue Description may be too long - displayed in case of roll over name is often not explicit enough for humanes Change-Id: Ibb1f74208376c93616fc89fa10fdeecaf0f8c8fb Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2017-05-10leverage tornado framework to simply impl of TestAPISerenaFeng4-35/+37
1) make better use of initialize() method 2) better naming global arguments Change-Id: I89dc72a358bcb2a5688a1ffeb3ed5d735d875a4a Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-05-10correct the import impl of TestAPISerenaFeng13-53/+55
Change-Id: Ia721ff61e02b1819c32d228f5f8910364c139c8a Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-05-10change swagger urls based on v1.2 specificationSerenaFeng3-10/+11
According to swagger1.2 specification, The Swagger specification is comprised of two file types: The Resources Listing and The API Declaration. https://github.com/OAI/OpenAPI-Specification/blob/master/versions/1.2.md Change-Id: I8f92897e41dbf6d4d2c3b1fe64ea6729f04cf3ad Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-05-05Merge "leverage executor to test_testcase.py in TestAPI"Serena Feng1-59/+64
2017-05-05Merge "leverage executor to test_project.py in TestAPI"Serena Feng1-61/+55
2017-05-05Merge "leverage executor to test_result.py in TestAPI"Serena Feng1-103/+105
2017-04-27Merge "leverage executor to test_token/version.py in TestAPI"Morgan Richomme2-42/+41
2017-04-27Merge changes from topics 'unittest_executor', 'import_absolute'Morgan Richomme10-34/+117
* changes: impl executor and leverage to test_pod.py in TestAPI import from absolute path in TestAPI unit
2017-04-13leverage executor to test_token/version.py in TestAPISerenaFeng2-42/+41
Change-Id: Ia1e6b0e787d477a19c78b56ff249d544b49a087b Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-04-13leverage executor to test_testcase.py in TestAPISerenaFeng1-59/+64
Change-Id: I8bb7459e5dee49cd120e848ac70834c8d9665a45 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-04-13leverage executor to test_result.py in TestAPISerenaFeng1-103/+105
Change-Id: Ie4388a4be0cb174129ac168530559114046680ab Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-04-13leverage executor to test_project.py in TestAPISerenaFeng1-61/+55
Change-Id: I2ebc86a4c395182ca783d3d36befbed2a21f512b Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-04-13impl executor and leverage to test_pod.py in TestAPISerenaFeng2-24/+107
implement executor.py leverage executor to test_pod.py Change-Id: Ief70a28a935c86430e26f90f35112a7bab9fa81b Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-04-10import from absolute path in TestAPI unitSerenaFeng9-10/+10
Change-Id: Ic42db22d825229713b38c75c141af7742ca65dd3 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-04-09unify data existence checkSerenaFeng7-173/+189
Change-Id: I2ee4c3be6f34ce12530450cd22f2561c458685f9 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-04-06change not_found to forbidden when db not existSerenaFeng2-6/+6
Change-Id: I1aa61c5d1b057b5a53cf6369b26605867a4d092e Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-04-06unify error message in TestAPISerenaFeng14-67/+122
Change-Id: I994feb7bf340c9e48bebe9fdf3dc3a76bc254652 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-03-30unify raise exception processSerenaFeng4-33/+52
Change-Id: I109ef9550a57e218b6f5c9196812b33133d34134 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-03-30replace self-defined http codes with standard definitionsSerenaFeng13-126/+115
Change-Id: I3045dc690e0bc1186f5c548cb533462dd03130d9 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-03-29add rename scenario exceptionsSerenaFeng2-8/+54
JIRA: RELENG-163 Change-Id: I680a181a3c1728034e5782de4bc65cc07f64540c Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-03-28keep methods' name/docstring after decoratorSerenaFeng2-0/+7
applying functools.wraps() to keep the name and docstring of the original function which is decorated Change-Id: Id612039921566dd48f8d8797abe30f23aaf99301 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-03-23Merge "start TestAPI in venv with no config-file"Jose Lausuch1-2/+7
2017-03-23Merge "restore setup.cfg in case submitted by mistake"Jose Lausuch1-0/+3
2017-03-23Merge "make unittest execution more user-friendly"Jose Lausuch2-10/+9
2017-03-23make unittest execution more user-friendlySerenaFeng2-10/+9
allow users use their existed venv manage all test-related libs in test-requirements.txt Change-Id: I39a63833e4a1f4f088afa045a83bf12cd01da167 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-03-23restore setup.cfg in case submitted by mistakeSerenaFeng1-0/+3
in venv mode, setup.cfg will be modified to fit venv condition, restore to the original after installation Change-Id: Ib38b2ab9e015201c812305414a207c05bdf7c830 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-03-23start TestAPI in venv with no config-fileSerenaFeng1-2/+7
in virtual env mode, config.ini is configured in .venv/etc/opnfv_testapi, in this case when we start it the configuration file needs to be specified, by changing the _default_config, the -config-file is no longer needed when starting TestAPI in venv mode. Change-Id: I0217cfefe578bbc3325bb7577ed268dc21cde4ea Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-03-23fix: always return 200 even if exception happensSerenaFeng1-6/+0
when post/update/delete is executed, the return value always are 200, even if exceptions such as 404/409 happen Change-Id: I612ad15cc6567f435caa4c889bb0c7b6a73f9c52 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-03-14utils: fix yamllint issuesJessica Wagantall2-3/+3
Linting utils/test yaml files Change-Id: Id239cb2e2b2c4658dedfc187b7784b0302701700 Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
2017-03-02Problem with rally_sanity resultsSerenaFeng1-98/+116
after refactor, details in rally_sanity became 'unicode', which contains built-in 'format' method, which is not processed correctly error message: File "/usr/local/lib/python2.7/dist-packages/opnfv_testapi/resources/models.py", line 36, in _format for h in dicts[k]] KeyError: u"u'details'" JIRA: FUNCTEST-723 Change-Id: If35e55f542fbbae8bd1a534938b7279b7a634880 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-03-01bugfix unittest test_queryProject occasionally failed in TestAPISerenaFeng2-4/+67
error message: "E AssertionError: Mismatched values: u'installers', expected:[], actual: [] Change-Id: Ieae5fdfd2a044909784cbb4766a5d25f4bbafcea Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-02-27Merge "make unittest cover server.py in TestAPI"Morgan Richomme5-19/+56
2017-02-27Use new-style classes which inherit from object in TestAPISerenaFeng1-1/+1
JIRA: FUNCTEST-707 Change-Id: I90a3d6ebfdf798eefccb8e5a0deebb661329d903 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-02-27make unittest cover server.py in TestAPISerenaFeng5-19/+56
Change-Id: Id379e6786e1f61fb1032f80636da107156e68fb5 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-02-24leverage tox to facilitate the developmentSerenaFeng3-0/+78
Before submitting a patch, we need to execute flake8, unittest, open coverage report, now with the help of tox any pytest, we can process them all with only one command. pytest is choosen here is because of its useful assert showcase, and powerful properties and healthy ecosystem(plugins of mock etc) Change-Id: I7ee89da370da08cc2bc70f7d3b1e2741d7d2e1e8 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-02-24add unittest of config.pySerenaFeng8-17/+105
Change-Id: I96639c47d27ef449d02528efad23e2499daa3def Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-02-24fix internal port of TestAPISerenaFeng2-9/+3
There are too many parameters when starting TestAPI container, it will confuse the user. I learned that docker containers like Jenkins and mongo the internal port is fixed, the user only need to change the exposed port, so the same strategy is adopted here Change-Id: I59424f5a1f36945d906975a741b631019fcbd46d Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-02-22Add unit tests to token based authenticationrohitsakala3-2/+121
Projects has been choosen as an helper to test token success,invalid and unauthorized JIRA: FUNCTEST-739 Change-Id: Iecc68821f5cc85630c17e54144723cc6f5e21ded Signed-off-by: rohitsakala <rohitsakala@gmail.com>
2017-02-21Add token based authentication for post/update/deleterohitsakala6-0/+34
As the mongodb database is not so secure today, this has been added. The token is stored in the mongoDB database. For now, authenticate variable is set false so that there would be no problem in accessing the databse by jenkins jobs. JIRA: FUNCTEST-730 Change-Id: I12b3907d650fc63efbdb031ebf3dd09519750109 Signed-off-by: rohitsakala <rohitsakala@gmail.com>
2017-02-21fix violation of import rule in TestAPISerenaFeng17-274/+273
TestAPI violate import rule of OpenStack Style a lot, like Do not import objects, only modules Do not import more than one module per line Alphabetically order your imports by the full module path This patch is mean to fix them. Change-Id: Ia05b944a74b3f443c9101a9840f613f9a6f5ae49 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>