diff options
Diffstat (limited to 'functest/opnfv_tests')
5 files changed, 43 insertions, 18 deletions
diff --git a/functest/opnfv_tests/features/odl_sfc.py b/functest/opnfv_tests/features/odl_sfc.py index 1956c9c8..431cd47e 100644 --- a/functest/opnfv_tests/features/odl_sfc.py +++ b/functest/opnfv_tests/features/odl_sfc.py @@ -8,6 +8,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 # import functest.core.feature_base as base +from sfc.tests.functest import run_tests class OpenDaylightSFC(base.FeatureBase): @@ -16,5 +17,6 @@ class OpenDaylightSFC(base.FeatureBase): super(OpenDaylightSFC, self).__init__(project='sfc', case='functest-odl-sfc', repo='dir_repo_sfc') - dir_sfc_functest = '{}/sfc/tests/functest'.format(self.repo) - self.cmd = 'cd %s && python ./run_tests.py' % dir_sfc_functest + + def execute(self): + return run_tests.main() diff --git a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py index 7d4c568a..4312b7f9 100755 --- a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py +++ b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py @@ -69,8 +69,8 @@ class RefstackClient(testcase_base.TestcaseBase): self.defcorelist)) logger.info("Starting Refstack_defcore test case: '%s'." % cmd) - header = ("Tempest environment:\n" - " Installer: %s\n Scenario: %s\n Node: %s\n Date: %s\n" % + header = ("Refstack environment:\n" + " SUT: %s\n Scenario: %s\n Node: %s\n Date: %s\n" % (CONST.INSTALLER_TYPE, CONST.DEPLOY_SCENARIO, CONST.NODE_NAME, @@ -79,26 +79,23 @@ class RefstackClient(testcase_base.TestcaseBase): f_stdout = open( os.path.join(conf_utils.REFSTACK_RESULTS_DIR, "refstack.log"), 'w+') - f_stderr = open( - os.path.join(conf_utils.REFSTACK_RESULTS_DIR, - "refstack-error.log"), 'w+') f_env = open(os.path.join(conf_utils.REFSTACK_RESULTS_DIR, "environment.log"), 'w+') f_env.write(header) p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, - stderr=f_stderr, bufsize=1) + stderr=subprocess.STDOUT, bufsize=1) with p.stdout: for line in iter(p.stdout.readline, b''): if 'Tests' in line: break - logger.info(line.replace('\n', '')) + if re.search("\} tempest\.", line): + logger.info(line.replace('\n', '')) f_stdout.write(line) p.wait() f_stdout.close() - f_stderr.close() f_env.close() def parse_refstack_result(self): @@ -110,12 +107,16 @@ class RefstackClient(testcase_base.TestcaseBase): for match in re.findall("Ran: (\d+) tests in (\d+\.\d{4}) sec.", output): num_tests = match[0] - for match in re.findall("- Passed: (\d+)", output): - num_success = match - for match in re.findall("- Skipped: (\d+)", output): - num_skipped = match - for match in re.findall("- Failed: (\d+)", output): - num_failures = match + logger.info("Ran: %s tests in %s sec." % (num_tests, match[1])) + for match in re.findall("(- Passed: )(\d+)", output): + num_success = match[1] + logger.info("".join(match)) + for match in re.findall("(- Skipped: )(\d+)", output): + num_skipped = match[1] + logger.info("".join(match)) + for match in re.findall("(- Failed: )(\d+)", output): + num_failures = match[1] + logger.info("".join(match)) success_testcases = "" for match in re.findall(r"\{0\}(.*?)[. ]*ok", output): success_testcases += match + ", " diff --git a/functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.txt b/functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.txt index fcdfe225..43edabc1 100644 --- a/functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.txt +++ b/functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.txt @@ -55,3 +55,19 @@ - tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops - tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern - tempest.scenario.test_volume_boot_pattern.TestVolumeBootPatternV2.test_volume_boot_pattern + +- + # https://bugs.launchpad.net/tempest/+bug/1577632 + scenarios: + - os-odl_l2-nofeature-ha + - os-odl_l2-nofeature-noha + - os-odl_l2-sfc-ha + - os-odl_l2-sfc-noha + - os-odl_l2-bgpvpn-ha + - os-odl_l2-bgpvpn-noha + - os-odl_l3-nofeature-ha + - os-odl_l3-nofeature-noha + installers: + - fuel + tests: + - tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index d3b15926..54556a32 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -116,7 +116,7 @@ class TempestCommon(testcase_base.TestcaseBase): logger.info("Starting Tempest test suite: '%s'." % cmd_line) header = ("Tempest environment:\n" - " Installer: %s\n Scenario: %s\n Node: %s\n Date: %s\n" % + " SUT: %s\n Scenario: %s\n Node: %s\n Date: %s\n" % (CONST.INSTALLER_TYPE, CONST.DEPLOY_SCENARIO, CONST.NODE_NAME, diff --git a/functest/opnfv_tests/vnf/ims/orchestra_ims.py b/functest/opnfv_tests/vnf/ims/orchestra_ims.py index d13fe8fe..5c19be09 100755 --- a/functest/opnfv_tests/vnf/ims/orchestra_ims.py +++ b/functest/opnfv_tests/vnf/ims/orchestra_ims.py @@ -311,10 +311,16 @@ class ImsVnf(vnf_base.VnfOnBoardingBase): creds = os_utils.get_credentials() self.logger.info("PoP creds: %s" % creds) + project_id = os_utils.get_tenant_id( + os_utils.get_keystone_client(), + creds.get("project_name")) + + self.logger.debug("project id: %s" % project_id) + vim_json = { "name": "vim-instance", "authUrl": creds.get("auth_url"), - "tenant": os.environ.get("OS_PROJECT_ID"), + "tenant": project_id, "username": creds.get("username"), "password": creds.get("password"), "securityGroups": [ |