try:
module = importlib.import_module(run_dict['module'])
cls = getattr(module, run_dict['class'])
- test_case = cls(case_name=test_name)
+ test_dict = ft_utils.get_dict_by_test(test_name)
+ test_case = cls(**test_dict)
try:
kwargs = run_dict['args']
operations in the VIM.
testcases:
-
- name: connection_check
+ case_name: connection_check
+ project_name: functest
criteria: 'status == "PASS"'
blocking: true
clean_flag: false
class: 'ConnectionCheck'
-
- name: api_check
+ case_name: api_check
+ project_name: functest
criteria: 'status == "PASS"'
blocking: true
clean_flag: false
module: 'functest.opnfv_tests.openstack.snaps.api_check'
class: 'ApiCheck'
-
- name: snaps_health_check
+ case_name: snaps_health_check
+ project_name: functest
criteria: 'status == "PASS"'
blocking: true
clean_flag: false
Set of basic Functional tests to validate the OPNFV scenarios.
testcases:
-
- name: vping_ssh
+ case_name: vping_ssh
+ project_name: functest
criteria: 'status == "PASS"'
blocking: true
clean_flag: true
class: 'VPingSSH'
-
- name: vping_userdata
+ case_name: vping_userdata
+ project_name: functest
criteria: 'status == "PASS"'
blocking: true
clean_flag: true
class: 'VPingUserdata'
-
- name: tempest_smoke_serial
+ case_name: tempest_smoke_serial
+ project_name: functest
criteria: 'success_rate == 100%'
blocking: false
clean_flag: true
class: 'TempestSmokeSerial'
-
- name: rally_sanity
+ case_name: rally_sanity
+ project_name: functest
criteria: 'success_rate == 100%'
blocking: false
clean_flag: false
class: 'RallySanity'
-
- name: refstack_defcore
+ case_name: refstack_defcore
+ project_name: functest
criteria: 'success_rate == 100%'
blocking: false
clean_flag: true
class: 'RefstackClient'
-
- name: odl
+ case_name: odl
+ project_name: functest
criteria: 'success_rate == 100%'
blocking: true
clean_flag: false
- /home/opnfv/repos/odl_test/csit/suites/openstack/neutron
-
- name: odl_netvirt
+ case_name: odl_netvirt
+ project_name: functest
criteria: 'success_rate == 100%'
blocking: false
clean_flag: false
- /home/opnfv/repos/odl_test/csit/suites/openstack/connectivity
-
- name: fds
+ case_name: fds
+ project_name: functest
criteria: 'success_rate == 100%'
blocking: false
clean_flag: false
- /home/opnfv/repos/fds/testing/robot
-
- name: onos
+ case_name: onos
+ project_name: functest
criteria: 'status == "PASS"'
blocking: true
clean_flag: true
class: 'Onos'
-
- name: snaps_smoke
+ case_name: snaps_smoke
+ project_name: functest
criteria: 'status == "PASS"'
blocking: false
clean_flag: false
integrated in functest
testcases:
-
- name: promise
+ case_name: promise
+ project_name: promise
criteria: 'success_rate == 100%'
blocking: false
clean_flag: true
class: 'Promise'
-
- name: doctor-notification
+ case_name: doctor-notification
+ project_name: doctor
criteria: 'status == "PASS"'
blocking: false
clean_flag: true
class: 'Doctor'
-
- name: bgpvpn
+ case_name: bgpvpn
+ project_name: sdnvpn
criteria: 'status == "PASS"'
blocking: false
clean_flag: true
class: 'SdnVpnTests'
-
- name: security_scan
+ case_name: security_scan
+ project_name: securityscanning
criteria: 'status == "PASS"'
blocking: false
clean_flag: true
class: 'SecurityScan'
-
- name: multisite
+ case_name: multisite
+ project_name: multisite
criteria: 'success_rate == 100%'
blocking: false
clean_flag: false
module: 'functest.opnfv_tests.openstack.tempest.tempest'
class: 'TempestMultisite'
-
- name: functest-odl-sfc
+ case_name: functest-odl-sfc
+ project_name: sfc
criteria: 'status == "PASS"'
blocking: false
clean_flag: true
module: 'functest.opnfv_tests.features.odl_sfc'
class: 'OpenDaylightSFC'
-
- name: onos_sfc
+ case_name: onos_sfc
+ project_name: functest
criteria: 'status == "PASS"'
blocking: true
clean_flag: true
module: 'functest.opnfv_tests.sdn.onos.onos'
class: 'OnosSfc'
-
- name: parser-basics
+ case_name: parser-basics
+ project_name: parser
criteria: 'ret == 0'
blocking: false
clean_flag: true
module: 'functest.opnfv_tests.vnf.rnc.parser'
class: 'Parser'
-
- name: domino-multinode
+ case_name: domino-multinode
+ project_name: domino
criteria: 'status == "PASS"'
blocking: false
clean_flag: true
module: 'functest.opnfv_tests.features.domino'
class: 'Domino'
-
- name: gluon_vping
+ case_name: gluon_vping
+ project_name: netready
criteria: 'status == "PASS"'
blocking: false
clean_flag: true
module: 'functest.opnfv_tests.features.netready'
class: 'GluonVping'
-
- name: barometercollectd
+ case_name: barometercollectd
+ project_name: barometer
criteria: 'status == "PASS"'
blocking: false
clean_flag: true
Extensive testing of OpenStack API.
testcases:
-
- name: tempest_full_parallel
+ case_name: tempest_full_parallel
+ project_name: functest
criteria: 'success_rate >= 80%'
blocking: false
clean_flag: true
module: 'functest.opnfv_tests.openstack.tempest.tempest'
class: 'TempestFullParallel'
-
- name: tempest_custom
+ case_name: tempest_custom
+ project_name: functest
criteria: 'success_rate == 100%'
blocking: false
clean_flag: true
module: 'functest.opnfv_tests.openstack.tempest.tempest'
class: 'TempestCustom'
-
- name: rally_full
+ case_name: rally_full
+ project_name: functest
criteria: 'success_rate >= 90%'
blocking: false
clean_flag: false
Collection of VNF test cases.
testcases:
-
- name: cloudify_ims
+ case_name: cloudify_ims
+ project_name: functest
criteria: 'status == "PASS"'
blocking: false
clean_flag: true
module: 'functest.opnfv_tests.vnf.ims.cloudify_ims'
class: 'CloudifyIms'
# -
-# name: aaa
+# case_name: aaa
+# project_name: functest
# criteria: 'ret == 0'
# blocking: false
# clean_flag: true
# module: 'functest.opnfv_tests.vnf.aaa.aaa'
# class: 'AaaVnf'
-
- name: orchestra_ims
+ case_name: orchestra_ims
+ project_name: functest
criteria: 'ret == 0'
blocking: false
clean_flag: true
class: 'ImsVnf'
-
- name: opera_ims
+ case_name: opera-vims
+ project_name: opera
criteria: 'status == "PASS"'
blocking: false
clean_flag: true
class: 'OperaIms'
-
- name: vyos_vrouter
+ case_name: vyos_vrouter
+ project_name: functest
criteria: 'status == "PASS"'
blocking: false
clean_flag: true
scenario = dic_testcase['dependencies']['scenario']
dep = th.Dependency(installer, scenario)
- testcase = th.TestCase(name=dic_testcase['name'],
+ testcase = th.TestCase(name=dic_testcase['case_name'],
dependency=dep,
criteria=dic_testcase['criteria'],
blocking=dic_testcase['blocking'],
class Feature(base.TestCase):
- def __init__(self, project='functest', case_name='', repo='', cmd=''):
- super(Feature, self).__init__(case_name=case_name)
- self.project_name = project
- self.cmd = cmd
+ def __init__(self, **kwargs):
+ super(Feature, self).__init__(**kwargs)
+ self.cmd = kwargs.get('cmd', '')
+ repo = kwargs.get('repo', '')
self.repo = CONST.__getattribute__(repo)
self.result_file = self.get_result_file()
- self.logger = ft_logger.Logger(project).getLogger()
+ self.logger = ft_logger.Logger(self.project_name).getLogger()
def run(self, **kwargs):
self.prepare()
This superclass is designed to execute pre-configured unittest.TestSuite()
objects
"""
- def __init__(self, case_name=''):
- super(PyTestSuiteRunner, self).__init__(case_name)
+ def __init__(self, **kwargs):
+ super(PyTestSuiteRunner, self).__init__(**kwargs)
self.suite = None
def run(self, **kwargs):
logger = ft_logger.Logger(__name__).getLogger()
- def __init__(self, case_name=""):
+ def __init__(self, **kwargs):
self.details = {}
- self.project_name = "functest"
- self.case_name = case_name
+ self.project_name = kwargs.get('project_name', 'functest')
+ self.case_name = kwargs.get('case_name', '')
self.criteria = ""
self.start_time = ""
self.stop_time = ""
logger = ft_logger.Logger(__name__).getLogger()
- def __init__(self, project='functest', case_name='', repo='', cmd=''):
- super(VnfOnBoardingBase, self).__init__(case_name=case_name)
- self.repo = repo
- self.project_name = project
- self.cmd = cmd
+ def __init__(self, **kwargs):
+ super(VnfOnBoardingBase, self).__init__(**kwargs)
+ self.repo = kwargs.get('repo', '')
+ self.cmd = kwargs.get('cmd', '')
self.details = {}
self.result_dir = CONST.dir_results
self.details['orchestrator'] = {}
Class for executing barometercollectd testcase.
'''
- def __init__(self, case_name='barometercollectd'):
- super(BarometerCollectd, self).__init__(project='barometer',
- case_name=case_name,
- repo='dir_repo_barometer')
+ def __init__(self, **kwargs):
+ kwargs["repo"] = 'dir_repo_barometer'
+ super(BarometerCollectd, self).__init__(**kwargs)
def execute(self):
return collectd.main(self.logger)
class Copper(base.Feature):
- def __init__(self, case_name='copper-notification'):
- super(Copper, self).__init__(project='copper',
- case_name=case_name,
- repo='dir_repo_copper')
+ def __init__(self, **kwargs):
+ kwargs["repo"] = 'dir_repo_copper'
+ super(Copper, self).__init__(**kwargs)
self.cmd = 'cd %s/tests && bash run.sh && cd -' % self.repo
class Doctor(base.Feature):
- def __init__(self, case_name='doctor-notification'):
- super(Doctor, self).__init__(project='doctor',
- case_name=case_name,
- repo='dir_repo_doctor')
+ def __init__(self, **kwargs):
+ kwargs["repo"] = 'dir_repo_doctor'
+ super(Doctor, self).__init__(**kwargs)
self.cmd = 'cd %s/tests && ./run.sh' % self.repo
class Domino(base.Feature):
- def __init__(self, case_name='domino-multinode'):
- super(Domino, self).__init__(project='domino',
- case_name=case_name,
- repo='dir_repo_domino')
+ def __init__(self, **kwargs):
+ kwargs["repo"] = 'dir_repo_domino'
+ super(Domino, self).__init__(**kwargs)
self.cmd = 'cd %s && ./tests/run_multinode.sh' % self.repo
class GluonVping(base.Feature):
- def __init__(self, case_name='gluon_vping'):
- super(GluonVping, self).__init__(project='netready',
- case_name=case_name,
- repo='dir_repo_netready')
+ def __init__(self, **kwargs):
+ kwargs["repo"] = 'dir_repo_netready'
+ super(GluonVping, self).__init__(**kwargs)
dir_netready_functest = '{}/test/functest'.format(self.repo)
self.cmd = ('cd %s && python ./gluon-test-suite.py' %
dir_netready_functest)
class OpenDaylightSFC(base.Feature):
- def __init__(self, case_name='functest-odl-sfc'):
- super(OpenDaylightSFC, self).__init__(project='sfc',
- case_name=case_name,
- repo='dir_repo_sfc')
+ def __init__(self, **kwargs):
+ kwargs["repo"] = 'dir_repo_sfc'
+ super(OpenDaylightSFC, self).__init__(**kwargs)
dir_sfc_functest = '{}/sfc/tests/functest'.format(self.repo)
self.cmd = 'cd %s && python ./run_tests.py' % dir_sfc_functest
class Promise(base.Feature):
- def __init__(self, case_name='promise'):
- super(Promise, self).__init__(project='promise',
- case_name=case_name,
- repo='dir_repo_promise')
+ def __init__(self, **kwargs):
+ kwargs["repo"] = 'dir_repo_promise'
+ super(Promise, self).__init__(**kwargs)
dir_promise_functest = '{}/promise/test/functest'.format(self.repo)
self.cmd = 'cd %s && python ./run_tests.py' % dir_promise_functest
class SdnVpnTests(base.Feature):
- def __init__(self, case_name='bgpvpn'):
- super(SdnVpnTests, self).__init__(project='sdnvpn',
- case_name=case_name,
- repo='dir_repo_sdnvpn')
+ def __init__(self, **kwargs):
+ kwargs["repo"] = 'dir_repo_sdnvpn'
+ super(SdnVpnTests, self).__init__(**kwargs)
dir_sfc_functest = '{}/sdnvpn/test/functest'.format(self.repo)
self.cmd = 'cd %s && python ./run_tests.py' % dir_sfc_functest
class SecurityScan(base.Feature):
- def __init__(self, case_name='security_scan'):
- super(SecurityScan, self).__init__(project='securityscanning',
- case_name=case_name,
- repo='dir_repo_securityscan')
+ def __init__(self, **kwargs):
+ kwargs["repo"] = 'dir_repo_securityscan'
+ super(SecurityScan, self).__init__(**kwargs)
self.cmd = ('. {0}/stackrc && '
'cd {1} && '
'python security_scan.py --config config.ini && '
class Orchestra(base.Feature):
- def __init__(self):
- super(Orchestra, self).__init__(project='orchestra',
- case='orchestra',
- repo='dir_repo_orchestra')
+ def __init__(self, **kwargs):
+ if "project_name" not in kwargs:
+ kwargs["project_name"] = "orchestra"
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = "orchestra"
+ kwargs['repo'] = 'dir_repo_orchestra'
+ super(Orchestra, self).__init__(**kwargs)
# TODO
# self.cmd = "%s/tests/run.sh %s/tests" % (self.repo, self.repo)
RALLY_PRIVATE_SUBNET_CIDR = CONST.rally_subnet_cidr
RALLY_ROUTER_NAME = CONST.rally_router_name
- def __init__(self, case_name=''):
- super(RallyBase, self).__init__(case_name)
+ def __init__(self, **kwargs):
+ super(RallyBase, self).__init__(**kwargs)
self.mode = ''
self.summary = []
self.scenario_dir = ''
class RallySanity(RallyBase):
- def __init__(self, case_name="rally_sanity"):
- super(RallySanity, self).__init__(case_name)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = "rally_sanity"
+ super(RallySanity, self).__init__(**kwargs)
self.mode = 'sanity'
self.test_name = 'all'
self.smoke = True
class RallyFull(RallyBase):
- def __init__(self, case_name="rally_full"):
- super(RallyFull, self).__init__(case_name)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = "rally_full"
+ super(RallyFull, self).__init__(**kwargs)
self.mode = 'full'
self.test_name = 'all'
self.smoke = False
class RefstackClient(testcase.TestCase):
- def __init__(self, case_name="refstack_defcore"):
- super(RefstackClient, self).__init__(case_name)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = "refstack_defcore"
+ super(RefstackClient, self).__init__(**kwargs)
self.FUNCTEST_TEST = CONST.dir_functest_test
self.CONF_PATH = CONST.refstack_tempest_conf_path
self.DEFCORE_LIST = CONST.refstack_defcore_list
that exercise many of the OpenStack APIs within Keystone, Glance, Neutron,
and Nova
"""
- def __init__(self, case_name="api_check"):
- super(ApiCheck, self).__init__(case_name)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = "api_check"
+ super(ApiCheck, self).__init__(**kwargs)
self.suite = unittest.TestSuite()
that simply obtain the different OpenStack clients and may perform
simple queries
"""
- def __init__(self, case_name="connection_check"):
- super(ConnectionCheck, self).__init__(case_name)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = "connection_check"
+ super(ConnectionCheck, self).__init__(**kwargs)
self.suite = unittest.TestSuite()
creates a VM with a single port with an IPv4 address that is assigned by
DHCP. This test then validates the expected IP with the actual
"""
- def __init__(self, case_name="snaps_health_check"):
- super(HealthCheck, self).__init__(case_name)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = "snaps_health_check"
+ super(HealthCheck, self).__init__(**kwargs)
self.suite = unittest.TestSuite()
that exercise many of the OpenStack APIs within Keystone, Glance, Neutron,
and Nova
"""
- def __init__(self, case_name="snaps_smoke"):
- super(SnapsSmoke, self).__init__(case_name)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = "snaps_smoke"
+ super(SnapsSmoke, self).__init__(**kwargs)
self.suite = unittest.TestSuite()
use_fip = CONST.snaps_use_floating_ips
creates a VM with a single port with an IPv4 address that is assigned by
DHCP. This test then validates the expected IP with the actual
"""
- def __init__(self, case_name=''):
- super(SnapsTestRunner, self).__init__(case_name)
+ def __init__(self, **kwargs):
+ super(SnapsTestRunner, self).__init__(**kwargs)
self.ext_net_name = snaps_utils.get_ext_net_name()
self.logger = ft_logger.Logger(self.project_name).getLogger()
class TempestCommon(testcase.TestCase):
- def __init__(self, case_name=''):
- super(TempestCommon, self).__init__(case_name)
+ def __init__(self, **kwargs):
+ super(TempestCommon, self).__init__(**kwargs)
self.MODE = ""
self.OPTION = ""
self.VERIFIER_ID = conf_utils.get_verifier_id()
class TempestSmokeSerial(TempestCommon):
- def __init__(self, case_name='tempest_smoke_serial'):
- TempestCommon.__init__(self, case_name)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = 'tempest_smoke_serial'
+ TempestCommon.__init__(self, **kwargs)
self.MODE = "smoke"
self.OPTION = "--concurrency 1"
class TempestSmokeParallel(TempestCommon):
- def __init__(self, case_name='tempest_smoke_parallel'):
- TempestCommon.__init__(self, case_name)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = 'tempest_smoke_parallel'
+ TempestCommon.__init__(self, **kwargs)
self.MODE = "smoke"
self.OPTION = ""
class TempestFullParallel(TempestCommon):
- def __init__(self, case_name="tempest_full_parallel"):
- TempestCommon.__init__(self, case_name)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = 'tempest_full_parallel'
+ TempestCommon.__init__(self, **kwargs)
self.MODE = "full"
class TempestMultisite(TempestCommon):
- def __init__(self, case_name="multisite"):
- TempestCommon.__init__(self, case_name)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = 'multisite'
+ TempestCommon.__init__(self, **kwargs)
self.MODE = "feature_multisite"
self.OPTION = "--concurrency 1"
conf_utils.install_verifier_ext(CONST.dir_repo_kingbird)
class TempestCustom(TempestCommon):
- def __init__(self, case_name="tempest_custom"):
- TempestCommon.__init__(self, case_name)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = 'tempest_custom'
+ TempestCommon.__init__(self, **kwargs)
self.MODE = "custom"
self.OPTION = "--concurrency 1"
class TempestDefcore(TempestCommon):
- def __init__(self, case_name="tempest_defcore"):
- TempestCommon.__init__(self, case_name)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = 'tempest_defcore'
+ TempestCommon.__init__(self, **kwargs)
self.MODE = "defcore"
self.OPTION = "--concurrency 1"
class VPingBase(testcase.TestCase):
- def __init__(self, case_name=''):
- super(VPingBase, self).__init__(case_name)
+ def __init__(self, **kwargs):
+ super(VPingBase, self).__init__(**kwargs)
self.logger = None
self.functest_repo = CONST.dir_repo_functest
self.repo = CONST.dir_vping
class VPingSSH(vping_base.VPingBase):
- def __init__(self, case_name='vping_ssh'):
- super(VPingSSH, self).__init__(case_name)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = "vping_ssh"
+ super(VPingSSH, self).__init__(**kwargs)
self.logger = ft_logger.Logger(self.case_name).getLogger()
def do_vping(self, vm, test_ip):
class VPingUserdata(vping_base.VPingBase):
- def __init__(self, case_name='vping_userdata'):
- super(VPingUserdata, self).__init__(case_name)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = "vping_userdata"
+ super(VPingUserdata, self).__init__(**kwargs)
self.logger = ft_logger.Logger(self.case_name).getLogger()
def boot_vm_preparation(self, config, vmname, test_ip):
class Onos(OnosBase):
- def __init__(self, case_name='onos'):
- super(Onos, self).__init__(case_name)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = "onos"
+ super(Onos, self).__init__(**kwargs)
self.log_path = os.path.join(self.onos_repo_path, 'TestON/logs')
def set_onos_ip(self):
logger = ft_logger.Logger("VNF AAA").getLogger()
- def __init__(self):
- super(AaaVnf, self).__init__(case_name="aaa")
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = "aaa"
+ super(AaaVnf, self).__init__(**kwargs)
def deploy_orchestrator(self):
self.logger.info("No VNFM needed to deploy a free radius here")
class ClearwaterOnBoardingBase(vnf_base.VnfOnBoardingBase):
- def __init__(self, project='functest', case='', repo='', cmd=''):
+ def __init__(self, **kwargs):
self.logger = ft_logger.Logger(__name__).getLogger()
- super(ClearwaterOnBoardingBase, self).__init__(
- project, case, repo, cmd)
+ super(ClearwaterOnBoardingBase, self).__init__(**kwargs)
self.case_dir = os.path.join(CONST.dir_functest_test, 'vnf', 'ims')
self.data_dir = CONST.dir_ims_data
- self.result_dir = os.path.join(CONST.dir_results, case)
+ self.result_dir = os.path.join(CONST.dir_results, self.case_name)
self.test_dir = CONST.dir_repo_vims_test
if not os.path.exists(self.data_dir):
class CloudifyIms(clearwater_ims_base.ClearwaterOnBoardingBase):
- def __init__(self, project='functest', case_name='cloudify_ims',
- repo='', cmd=''):
- super(CloudifyIms, self).__init__(project, case_name, repo, cmd)
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = "cloudify_ims"
+ super(CloudifyIms, self).__init__(**kwargs)
self.logger = ft_logger.Logger(__name__).getLogger()
# Retrieve the configuration
class Parser(base.Feature):
- def __init__(self, case_name='parser-basics'):
- super(Parser, self).__init__(project='parser',
- case_name=case_name,
- repo='dir_repo_parser')
+ def __init__(self, **kwargs):
+ kwargs["repo"] = 'dir_repo_parser'
+ super(Parser, self).__init__(**kwargs)
self.cmd = 'cd %s/tests && ./functest_run.sh' % self.repo
class VrouterVnf(base.Feature):
- def __init__(self):
- super(VrouterVnf, self).__init__(project='functest',
- case='vyos_vrouter',
- repo='dir_repo_vrouter')
+ def __init__(self, **kwargs):
+ kwargs["repo"] = 'dir_repo_vrouter'
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = "vyos_vrouter"
+ super(VrouterVnf, self).__init__(**kwargs)
self.cmd = 'cd %s && ./run.sh' % self.repo
def set_result_details(self):
'scenario': 'test_scenario'}
self.testcase = {'dependencies': self.dependency,
- 'name': 'test_name',
+ 'case_name': 'test_name',
'criteria': 'test_criteria',
'blocking': 'test_blocking',
'clean_flag': 'test_clean_flag',
logging.disable(logging.CRITICAL)
_case_name = "base"
+ _project_name = "functest"
def setUp(self):
- self.test = testcase.TestCase(case_name=self._case_name)
- self.test.project = "functest"
+ self.test = testcase.TestCase(case_name=self._case_name,
+ project_name=self._project_name)
self.test.start_time = "1"
self.test.stop_time = "2"
self.test.criteria = "PASS"
self.assertEqual(self.test.push_to_db(),
testcase.TestCase.EX_OK)
mock_function.assert_called_once_with(
- self.test.project, self._case_name, self.test.start_time,
+ self._project_name, self._case_name, self.test.start_time,
self.test.stop_time, self.test.criteria, self.test.details)
@mock.patch('functest.utils.functest_utils.push_results_to_db',
self.assertEqual(self.test.push_to_db(),
testcase.TestCase.EX_PUSH_TO_DB_ERROR)
mock_function.assert_called_once_with(
- self.test.project, self._case_name, self.test.start_time,
+ self._project_name, self._case_name, self.test.start_time,
self.test.stop_time, self.test.criteria, self.test.details)
@mock.patch('functest.utils.functest_utils.push_results_to_db',
self.assertEqual(self.test.push_to_db(),
testcase.TestCase.EX_OK)
mock_function.assert_called_once_with(
- self.test.project, self._case_name, self.test.start_time,
+ self._project_name, self._case_name, self.test.start_time,
self.test.stop_time, self.test.criteria, self.test.details)
def test_check_criteria_missing(self):
logging.disable(logging.CRITICAL)
+ _case_name = "barometercollectd"
+ _project_name = "barometer"
+
def setUp(self):
self.barometer = barometer.BarometerCollectd(
- case_name="barometercollectd")
+ case_name=self._case_name, project_name=self._project_name)
def test_init(self):
- self.assertEqual(self.barometer.project_name, "barometer")
- self.assertEqual(self.barometer.case_name, "barometercollectd")
+ self.assertEqual(self.barometer.project_name, self._project_name)
+ self.assertEqual(self.barometer.case_name, self._case_name)
self.assertEqual(
self.barometer.repo,
constants.CONST.__getattribute__('dir_repo_barometer'))
logging.disable(logging.CRITICAL)
+ _case_name = "copper-notification"
+ _project_name = "copper"
+
def setUp(self):
- self.copper = copper.Copper(case_name="copper-notification")
+ self.copper = copper.Copper(case_name=self._case_name,
+ project_name=self._project_name)
def test_init(self):
- self.assertEqual(self.copper.project_name, "copper")
- self.assertEqual(self.copper.case_name, "copper-notification")
+ self.assertEqual(self.copper.project_name, self._project_name)
+ self.assertEqual(self.copper.case_name, self._case_name)
self.assertEqual(
self.copper.repo,
constants.CONST.__getattribute__("dir_repo_copper"))
logging.disable(logging.CRITICAL)
+ _case_name = "doctor-notification"
+ _project_name = "doctor"
+
def setUp(self):
- self.doctor = doctor.Doctor(case_name="doctor-notification")
+ self.doctor = doctor.Doctor(case_name=self._case_name,
+ project_name=self._project_name)
def test_init(self):
- self.assertEqual(self.doctor.project_name, "doctor")
- self.assertEqual(self.doctor.case_name, "doctor-notification")
+ self.assertEqual(self.doctor.project_name, self._project_name)
+ self.assertEqual(self.doctor.case_name, self._case_name)
self.assertEqual(
self.doctor.repo,
constants.CONST.__getattribute__("dir_repo_doctor"))
logging.disable(logging.CRITICAL)
+ _case_name = "domino-multinode"
+ _project_name = "domino"
+
def setUp(self):
- self.domino = domino.Domino(case_name="domino-multinode")
+ self.domino = domino.Domino(case_name=self._case_name,
+ project_name=self._project_name)
def test_init(self):
- self.assertEqual(self.domino.project_name, "domino")
- self.assertEqual(self.domino.case_name, "domino-multinode")
+ self.assertEqual(self.domino.project_name, self._project_name)
+ self.assertEqual(self.domino.case_name, self._case_name)
self.assertEqual(
self.domino.repo,
constants.CONST.__getattribute__("dir_repo_domino"))
logging.disable(logging.CRITICAL)
+ _case_name = "gluon_vping"
+ _project_name = "netready"
+
def setUp(self):
- self.netready = netready.GluonVping(case_name="gluon_vping")
+ self.netready = netready.GluonVping(case_name=self._case_name,
+ project_name=self._project_name)
def test_init(self):
- self.assertEqual(self.netready.project_name, "netready")
- self.assertEqual(self.netready.case_name, "gluon_vping")
+ self.assertEqual(self.netready.project_name, self._project_name)
+ self.assertEqual(self.netready.case_name, self._case_name)
self.assertEqual(
self.netready.repo,
constants.CONST.__getattribute__("dir_repo_netready"))
logging.disable(logging.CRITICAL)
+ _case_name = "functest-odl-sfc"
+ _project_name = "sfc"
+
def setUp(self):
- self.odl_sfc = odl_sfc.OpenDaylightSFC(case_name="functest-odl-sfc")
+ self.odl_sfc = odl_sfc.OpenDaylightSFC(
+ case_name="functest-odl-sfc",
+ project_name=self._project_name)
def test_init(self):
self.assertEqual(self.odl_sfc.project_name, "sfc")
logging.disable(logging.CRITICAL)
+ _case_name = "promise"
+ _project_name = "promise"
+
def setUp(self):
- self.promise = promise.Promise(case_name="promise")
+ self.promise = promise.Promise(case_name=self._case_name,
+ project_name=self._project_name)
def test_init(self):
- self.assertEqual(self.promise.project_name, "promise")
- self.assertEqual(self.promise.case_name, "promise")
+ self.assertEqual(self.promise.project_name, self._project_name)
+ self.assertEqual(self.promise.case_name, self._case_name)
self.assertEqual(
self.promise.repo,
constants.CONST.__getattribute__("dir_repo_promise"))
logging.disable(logging.CRITICAL)
+ _case_name = "bgpvpn"
+ _project_name = "sdnvpn"
+
def setUp(self):
- self.sdnvpn = sdnvpn.SdnVpnTests(case_name="bgpvpn")
+ self.sdnvpn = sdnvpn.SdnVpnTests(case_name=self._case_name,
+ project_name=self._project_name)
def test_init(self):
- self.assertEqual(self.sdnvpn.project_name, "sdnvpn")
- self.assertEqual(self.sdnvpn.case_name, "bgpvpn")
+ self.assertEqual(self.sdnvpn.project_name, self._project_name)
+ self.assertEqual(self.sdnvpn.case_name, self._case_name)
self.assertEqual(
self.sdnvpn.repo,
constants.CONST.__getattribute__("dir_repo_sdnvpn"))
logging.disable(logging.CRITICAL)
+ _case_name = "security_scan"
+ _project_name = "security_scan"
+
def setUp(self):
- self.sscan = security_scan.SecurityScan(case_name="security_scan")
+ self.sscan = security_scan.SecurityScan(
+ case_name=self._case_name, project_name=self._project_name)
def test_init(self):
- self.assertEqual(self.sscan.project_name, "securityscanning")
- self.assertEqual(self.sscan.case_name, "security_scan")
+ self.assertEqual(self.sscan.project_name, self._project_name)
+ self.assertEqual(self.sscan.case_name, self._case_name)
self.assertEqual(
self.sscan.repo,
constants.CONST.__getattribute__("dir_repo_securityscan"))
os.environ["OS_USERNAME"] = self._os_username
os.environ["OS_PASSWORD"] = self._os_password
os.environ["OS_TENANT_NAME"] = self._os_tenantname
- self.test = odl.ODLTests()
+ self.test = odl.ODLTests(case_name='odl', project_name='functest')
self.defaultargs = {'odlusername': self._odl_username,
'odlpassword': self._odl_password,
'neutronip': self._keystone_ip,
self.cmd = 'test_cmd'
self.output_file = 'test_output_file'
self.testname = 'testname'
- self.testcase_dict = {'name': 'testname', 'criteria': self.criteria}
+ self.testcase_dict = {'case_name': 'testname',
+ 'criteria': self.criteria}
self.parameter = 'general.openstack.image_name'
self.config_yaml = 'test_config_yaml-'
self.db_url_env = 'http://foo/testdb'
logging.disable(logging.CRITICAL)
+ _case_name = "parser-basics"
+ _project_name = "parser"
+
def setUp(self):
- self.parser = parser.Parser(case_name="parser-basics")
+ self.parser = parser.Parser(
+ case_name=self._case_name, project_name=self._project_name)
def test_init(self):
- self.assertEqual(self.parser.project_name, "parser")
- self.assertEqual(self.parser.case_name, "parser-basics")
+ self.assertEqual(self.parser.project_name, self._project_name)
+ self.assertEqual(self.parser.case_name, self._case_name)
self.assertEqual(
self.parser.repo,
constants.CONST.__getattribute__("dir_repo_parser"))
for dic_tier in testcases_yaml.get("tiers"):
for dic_testcase in dic_tier['testcases']:
- if dic_testcase['name'] == testname:
+ if dic_testcase['case_name'] == testname:
return dic_testcase
logger.error('Project %s is not defined in testcases.yaml' % testname)