summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Lausuch <jalausuch@suse.com>2017-10-18 11:16:19 +0200
committerJose Lausuch <jalausuch@suse.com>2017-10-18 11:20:13 +0200
commitb8d1b8a5f1b8f7d400c82c4988b0d76e1416d34b (patch)
tree134c738de26bc3f942638954cc8386da93eefb0c
parent778d4874047341c2b6af5c91c7553cc15e1cdaaf (diff)
Inheritance from Feature class
Change-Id: I81aa9582452ca43a4eab32ba34a640043c89043e Signed-off-by: Jose Lausuch <jalausuch@suse.com>
-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 52a6994..f64ee18 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:
gather_logs('overall')
except Exception as ex:
@@ -93,13 +89,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())