aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-03-17 21:45:41 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-03-17 21:54:42 +0100
commit8de16b7187a8a6133c025ef504ead48d7adb0cac (patch)
treea053626b03da6a34032df9c035080338c78ba353
parent78c0b09a2cf3a57ae5d4f8cfe67ab66ad9d8aef2 (diff)
Refactor refstack to limit instructions
Change-Id: I3cd490d18898d0ee6f48e4c19d7ed65c0cf0c275 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--functest/opnfv_tests/openstack/refstack/refstack.py32
1 files changed, 8 insertions, 24 deletions
diff --git a/functest/opnfv_tests/openstack/refstack/refstack.py b/functest/opnfv_tests/openstack/refstack/refstack.py
index a55b147f1..b55f7268a 100644
--- a/functest/opnfv_tests/openstack/refstack/refstack.py
+++ b/functest/opnfv_tests/openstack/refstack/refstack.py
@@ -12,11 +12,8 @@
import logging
import os
import shutil
-import time
from refstack_client import list_parser
-from xtesting.core import testcase
-from xtesting.energy import energy
from functest.opnfv_tests.openstack.tempest import tempest
from functest.utils import config
@@ -38,24 +35,11 @@ class Refstack(tempest.TempestCommon):
getattr(config.CONF, 'dir_results'), 'refstack')
self.list = os.path.join(self.res_dir, 'tempest-list.txt')
- @energy.enable_recording
- def run(self, **kwargs):
- """Start Refstack testcase."""
- self.start_time = time.time()
- try:
- self.configure()
- parser = list_parser.TestListParser(
- getattr(config.CONF, 'dir_repo_tempest'))
- nfile = parser.get_normalized_test_list(Refstack.defcorelist)
- shutil.copyfile(nfile, self.list)
- self.run_verifier_tests()
- self.parse_verifier_result()
- self.generate_report()
- res = testcase.TestCase.EX_OK
- except Exception: # pylint: disable=broad-except
- self.__logger.exception('Error with run')
- res = testcase.TestCase.EX_RUN_ERROR
- finally:
- self.resources.cleanup()
- self.stop_time = time.time()
- return res
+ def generate_test_list(self):
+ parser = list_parser.TestListParser(
+ getattr(config.CONF, 'dir_repo_tempest'))
+ nfile = parser.get_normalized_test_list(Refstack.defcorelist)
+ shutil.copyfile(nfile, self.list)
+
+ def apply_tempest_blacklist(self):
+ pass