summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Irnich <tim.irnich@ericsson.com>2017-10-19 08:14:00 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-10-19 08:14:00 +0000
commit6f4fa990aec1d58d39930311640cd6f086e5b696 (patch)
tree303b8949aaff781c5f3316c563d1229f7d4e1233
parentcd6a598f8e0c18820783d0b0e9d3135fa833d826 (diff)
parentb8d1b8a5f1b8f7d400c82c4988b0d76e1416d34b (diff)
Merge "Inheritance from Feature class"
-rw-r--r--sdnvpn/test/functest/run_sdnvpn_tests.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/sdnvpn/test/functest/run_sdnvpn_tests.py b/sdnvpn/test/functest/run_sdnvpn_tests.py
index 8e8cf81..cff6a27 100644
--- a/sdnvpn/test/functest/run_sdnvpn_tests.py
+++ b/sdnvpn/test/functest/run_sdnvpn_tests.py
@@ -12,23 +12,21 @@ import importlib
import logging
import os
import sys
-import time
import traceback
import yaml
-from functest.core import testcase
+from functest.core import feature as base
from sdnvpn.lib import config as sdnvpn_config
from sdnvpn.lib.gather_logs import gather_logs
COMMON_CONFIG = sdnvpn_config.CommonConfig()
-class SdnvpnFunctest(testcase.TestCase):
+class SdnvpnFunctest(base.Feature):
__logger = logging.getLogger(__name__)
- def run(self):
- self.start_time = time.time()
+ def execute(self):
cmd_line = "neutron quota-update --subnet -1 --network -1 --port -1"
self.__logger.info("Setting subnet/net quota to unlimited : %s"
@@ -82,8 +80,6 @@ class SdnvpnFunctest(testcase.TestCase):
if status == "FAIL":
overall_status = "FAIL"
- self.stop_time = time.time()
-
try:
installer_type = str(os.environ['INSTALLER_TYPE'].lower())
if installer_type in ["fuel", "apex"]:
@@ -99,13 +95,13 @@ class SdnvpnFunctest(testcase.TestCase):
if overall_status == "PASS":
self.result = 100
- return testcase.TestCase.EX_OK
+ return base.Feature.EX_OK
- return testcase.TestCase.EX_RUN_ERROR
+ return base.Feature.EX_RUN_ERROR
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s'
'- %(levelname)s - %(message)s')
SDNVPN = SdnvpnFunctest()
- sys.exit(SDNVPN.run())
+ sys.exit(SDNVPN.execute())