aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils/decorators.py
AgeCommit message (Collapse)AuthorFilesLines
2017-04-20Fix pylint warnings in decorators.pyCédric Ollivier1-8/+12
Change-Id: Ie6c53feb97053248c909d641753b44b5f51c8719 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-04-19Stop hardcoding results suffix in push_to_dbMatthewLi1-2/+3
Adding results in url is useless as it is defined in results section in config_functest.yaml. It allows defining the full name in case of dumping to file (see decorator.py). The commented local file is the value required by dovetail. Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: I35ba9b34d99e138292f099934e28585ee8b85604 Signed-off-by: MatthewLi <matthew.lijun@huawei.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-03-22Switch test_db_url to a directoryxudan1-1/+8
We must now set a dir (e.g. /home/opnfv/db) to dump results. It avoids replacing "results" and prevent from limiting the use of this decorator. All data will be dumped into url/dump.txt As also proposed in FUNCTEST-729, missing directories are created too. The decorator will raise exceptions if dir exists or if target is not a directory. Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> JIRA: FUNCTEST-729 Change-Id: I9650c72493043539f17725f5c328c12639ecc059 Signed-off-by: xudan <xudan16@huawei.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-02-13Add can_dump_request_to_file decoratorCédric Ollivier1-0/+36
can_dump_request_to_file can be called to dump any request data to a local file as defined by test_db_url. If its scheme is file, Session.send() is patched. Else the behavior is kept unchanged. Change-Id: Id219dad274b5f02a05259a2ed13e882c04eea7b4 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>