summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi
AgeCommit message (Collapse)AuthorFilesLines
2017-08-18Merge "bugfix: testapi is killed because of oom_kill"Serena Feng2-17/+19
2017-08-17impl update trust_indicator in scenarioSerenaFeng3-22/+98
Change-Id: I1afe38412926778bc84d178dbbfc3fe0cde15f69 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-16bugfix: testapi is killed because of oom_killSerenaFeng2-17/+19
if page is not provided, return page 1 to avoid large memory consume, further more to kill testapi: Out of memory: Kill process 30842 (opnfv-testapi) score 519 or sacrifice child Killed process 30842 (opnfv-testapi) total-vm:4739716kB, anon-rss:3974612kB, file-rss:0kB JIRA: RELENG-291 Change-Id: Id0e144c030aee390cc41cff8a48e3c997de4ad84 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-15update scenario scoresSerenaFeng4-6/+190
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 codeSerenaFeng3-410/+10
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-08-10Merge "add Pods page in webportal"Serena Feng9-504/+212
2017-08-09add Pods page in webportalSerenaFeng9-504/+212
delete OPNFV Powered Guidelines page add Pods page with create/list operations Change-Id: Ib9fd2834bd9d54ee33600458a90e3aac76382589 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-26merge swagger_base_url with ui_urlSerenaFeng9-16/+12
TestAPI used to have only one webpage, which is swagger_ui, now a new one webportal is added, and the base url is the same (http://testresults.opnfv.org/test)for them both. This patch aim to unify the urls. Change-Id: I15295975fb05f7e8c8d413e12b2b5c0784f0799a Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-24delete obsolete run_test.shSerenaFeng1-40/+0
after switching to tox, run_test.sh is not used now Change-Id: I66d40d6df47652b956f85f022843b60886ce41a2 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-21query date from oldest to newestSerenaFeng1-11/+20
Change-Id: I3d0345bb85967f48617c485bbee1dfe6fa04a644 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-21separate db methods from handler.pySerenaFeng9-54/+60
db methods are mingled in handler, which is not well structured Change-Id: I639679d3fc05a0b6528158186b8bf89e0cd10596 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-21Merge "decouple the mutual-dependence of config.py and server.py"Jose Lausuch11-68/+75
2017-07-20decouple the mutual-dependence of config.py and server.pySerenaFeng11-68/+75
Currently server.py relies on CONF while starting the service, and config.py's config_fie is set in server.py, which is wrongly bi-depended this patch aims to let Config parse the sys.argv personally, just as oslo.config do, so that decouple the mutual-dependency Change-Id: I46887d122a98d478caebe9eeb7ab038941ce1f6b Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-20modify url to relative path to fit with testresults.opnfv.org/testgrakiss1-3/+3
Change-Id: Ia600fe310404a1ba45e9571d611eedcdc669dbc7 Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
2017-07-20role based access control and result uploadgrakiss14-21/+225
1. add role for user 2. user can upload test results Change-Id: I1c5370be7818edb0394f05e8b81f975deb98b286 Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
2017-07-19Merge "bugfix: pagination raise exception when no records returned"Serena Feng1-13/+14
2017-07-19Merge "bugfix: query doesn't work well with period=1"Serena Feng3-7/+35
2017-07-19Merge "bugfix: mix order of Arno results"Serena Feng2-2/+2
2017-07-19bugfix: pagination raise exception when no records returnedSerenaFeng1-13/+14
if no records returned, it will raise 'Request page > total_pages' error. this patch is submitted to fix this JIRA: RELENG-281 Change-Id: I447247c55c64674d44d21d6f4ac8bb3ef725cfb0 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-19bugfix: query doesn't work well with period=1SerenaFeng3-7/+35
when querying by date, if $lt is not provided, the empty/None/null/'' results will also be returned, the patch aims to fix this issue by adding $lt = datetime.now() if not provided JIRA: RELENG-212 Change-Id: Ida1e7d386a88d4ab640441df161c1fe134593f82 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-19bugfix: mix order of Arno resultsSerenaFeng2-2/+2
because start_date is not always in the same format or timezone, sort by start_date will be misordered some times, in this patch leverage '_id' to do the sort, it is generated by mongodb itself, always upscend. JIRA: FUNCTEST-694 JIRA: RELENG-213 Change-Id: Ie0ed5cd09c3f7abb1803d72abe5ecab440c1569c Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-14leverage openstack's requirements ruleSerenaFeng2-11/+11
change requirements.txt and test-requirements.txt to keep consistent with openstack's global-requirements.txt Change-Id: I0e62c88b957136438a23e85e41d775194bdc8757 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-14leverage tox and pytest to execute unit testSerenaFeng2-4/+9
Change-Id: I20856e1b445587f0d8ee23e792793af863743252 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-14testapi: bugfix of toxMatthewLi9-4/+13
error log https://gerrit.opnfv.org/gerrit/#/c/37053/ https://build.opnfv.org/ci/job/testapi-verify-master/220/console Change-Id: Id278edad06c2852c662392d75fd3cf4041b03451 Signed-off-by: MatthewLi <lijun_1203@126.com>
2017-07-13Merge "leverage testapi's own gitignore"Serena Feng1-0/+4
2017-07-12leverage testapi's own gitignoreSerenaFeng1-0/+4
some files/dirs should be gitignored in testapi, but they may be needed in releng, this patch aims to manage gitignore by testapi itself Change-Id: I3c57d1199145d7f062d4e48aa8216ae34672f455 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-12move resources unit tests to tests/unit/resourcesSerenaFeng12-13/+13
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>
2017-07-05bugfix: hardcoded testapi urlsSerenaFeng6-12/+16
testapi webportal's urls are fixed in configure files this patch aims to modify them according to base_url provided when bringing up container Change-Id: I29c461fc3b837e54d4ff5330dcaa520637590ff7 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-06-28refactor list operationSerenaFeng1-26/+42
all operations mix together make it very difficult to read Change-Id: I7e4a12fd13a7aa0dc0c8fc09b69c7e43a2ab18ac Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-06-28bugfix: Exception when the results is emptySerenaFeng1-2/+2
list operation crash when limit is not provided, error message: OperationFailure: the limit must be positive JIRA: RELENG-265 Change-Id: Id8db93b594010d054a71d301d9c42eed113c12e1 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-06-27bugfix: pagination crash due to memory limitationSerenaFeng3-19/+54
MongoDB sorts the results in memory, and the default mem limitation is 32M, if the sort operation consumes more than that it will return an error: OperationFailure: Executor error during find command: OperationFailed Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit. To solve this problem, here we leverage aggregate() and allowDiskUse=True, it is said will not be limited by memory Change-Id: Id698ad1d02912e8b350a33a926fcccc390814fcc Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-06-23Merge "Changing urls of testapi api and resources"Serena Feng1-2/+2
2017-06-22Merge "support pagination in TestAPI"Serena Feng6-17/+68
2017-06-20support pagination in TestAPISerenaFeng6-17/+68
In this patch, pagination is supported, so you can go through results leveraging: http://testresults.opnfv.org/test/api/v1/results?page=2 Change-Id: Ibe31c787643f27dbb06c4899e713b3c8e716e784 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-06-20make website accessible via testresults.opnfv.org/testSerenaFeng3-12/+12
Currently, testapi website can not be fully accessed through testresults.opnfv.org/test, due to http://testresults.opnfv.org/test is not a root url. In this patch leverage relative path to make it accessible Change-Id: I56983d2221791d8a060039ec829278d31ecb5048 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-06-07add filter based on begin&end time of start_dateSerenaFeng2-4/+22
filter of 'Start Date' & 'End Date' in Community Results page now works, currently, only 20 records will be shown due to pagination is not supported. From server side, query from date to date is supported now, query as: /api/v1/results?from=2016-11-01%2000:00:00&to=2017-06-01%2023:59:59 Change-Id: I482b117129dbae38fa5a2858a86442c80d87d19e Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-06-06show community resultsSerenaFeng3-198/+29
show latest 20 results in cummunity results page. Because pagination is not supported, pagination related buttons are forbiddened now Change-Id: I3d94fc1b89845b6583dd40fe86d69407adfd2e6c Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-06-05substitute with testapi imgSerenaFeng4-0/+0
delete useless openstack and refstack images add testapi-logo.png. Currently it is a free one with signature finally we will substitute it with an official one. Change-Id: I6c1ccaa21fab311c5858351e58bd7c8d9392a75a Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-05-21Changing urls of testapi api and resourcesSakala Venkata Krishna Rohit1-2/+2
Change is done in reference to https://gerrit.opnfv.org/gerrit/#/c/34527/ This change will also fix the jenkins job testapi auto deploy which is failing. Change-Id: I5011718aa2bdf7e2aab0a12d406c4d0eece86972 Signed-off-by: Sakala Venkata Krishna Rohit <rohitsakala@gmail.com>
2017-05-20support cancel operation while signing inSerenaFeng3-2/+11
support the cancel operation in the https://openstackid.org/accounts/user/consent Change-Id: I06a1f130a3115774f2e88fc25dad522a7cf53e36 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-05-20Merge "add signout funcationality"Serena Feng3-0/+15
2017-05-19bugfix: extra fields are added when push resultsSerenaFeng2-4/+5
extra fields like 'carriers' & 'miss_checks' 'db_key' are added when pushing result to TestDB Change-Id: Ic8d0751bca14b3b3260df42c0f4f07456c9d5e05 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-05-19add signout funcationalitySerenaFeng3-0/+15
Change-Id: Ie101f07f0eb406eee4e1c7daa14b07aaaf554904 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-05-18support showing user's specified contents after signinSerenaFeng6-13/+68
Change-Id: Ia8897860757a2395873ff6972a508c38d7139854 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-05-18add signin web to TestAPISerenaFeng12-8/+136
Change-Id: I4d39a8561c8ebd3238a495e5799fd43fb1a508b9 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-05-17add missing dist files ignored by .gitignoreSerenaFeng18-0/+10231
Change-Id: Ib29cb5887abb317012d83fb77dcf30e07099a479 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
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>