aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack
diff options
context:
space:
mode:
Diffstat (limited to 'functest/opnfv_tests/openstack')
-rw-r--r--[-rwxr-xr-x]functest/opnfv_tests/openstack/healthcheck/healthcheck.sh0
-rw-r--r--functest/opnfv_tests/openstack/refstack_client/defcore.txt (renamed from functest/opnfv_tests/openstack/refstack_client/defcore_201608.txt)2
-rwxr-xr-xfunctest/opnfv_tests/openstack/refstack_client/refstack_client.py35
-rw-r--r--functest/opnfv_tests/openstack/snaps/snaps_test_runner.py5
-rw-r--r--functest/opnfv_tests/openstack/tempest/conf_utils.py10
-rw-r--r--functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.txt16
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py2
7 files changed, 47 insertions, 23 deletions
diff --git a/functest/opnfv_tests/openstack/healthcheck/healthcheck.sh b/functest/opnfv_tests/openstack/healthcheck/healthcheck.sh
index 7fa957c0..7fa957c0 100755..100644
--- a/functest/opnfv_tests/openstack/healthcheck/healthcheck.sh
+++ b/functest/opnfv_tests/openstack/healthcheck/healthcheck.sh
diff --git a/functest/opnfv_tests/openstack/refstack_client/defcore_201608.txt b/functest/opnfv_tests/openstack/refstack_client/defcore.txt
index 26eddafc..be8fd899 100644
--- a/functest/opnfv_tests/openstack/refstack_client/defcore_201608.txt
+++ b/functest/opnfv_tests/openstack/refstack_client/defcore.txt
@@ -77,7 +77,7 @@ tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_u
tempest.api.compute.test_quotas.QuotasTestJSON.test_get_default_quotas[id-9bfecac7-b966-4f47-913f-1a9e2c12134a]
tempest.api.compute.test_quotas.QuotasTestJSON.test_get_quotas[id-f1ef0a97-dbbb-4cca-adc5-c9fbc4f76107]
tempest.api.compute.test_versions.TestVersions.test_list_api_versions[id-6c0a0990-43b6-4529-9b61-5fd8daf7c55c]
-tempest.api.compute.volumes.test_attach_volume.AttachVolumeTestJSON.test_attach_detach_volume[id-52e9045a-e90d-4c0d-9087-79d657faffff]
+# tempest.api.compute.volumes.test_attach_volume.AttachVolumeTestJSON.test_attach_detach_volume[id-52e9045a-e90d-4c0d-9087-79d657faffff]
tempest.api.compute.volumes.test_attach_volume.AttachVolumeTestJSON.test_list_get_volume_attachments[id-7fa563fe-f0f7-43eb-9e22-a1ece036b513]
tempest.api.identity.v3.TestApiDiscovery.test_api_media_types[id-657c1970-4722-4189-8831-7325f3bc4265]
tempest.api.identity.v3.TestApiDiscovery.test_api_version_resources[id-b9232f5e-d9e5-4d97-b96c-28d3db4de1bd]
diff --git a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
index c9f0f275..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 + ", "
@@ -129,10 +130,10 @@ class RefstackClient(testcase_base.TestcaseBase):
num_executed = int(num_tests) - int(num_skipped)
success_rate = 100 * int(num_success) / int(num_executed)
- self.details = {"num_tests": int(num_tests),
- "num_failures": int(num_failures),
+ self.details = {"tests": int(num_tests),
+ "failures": int(num_failures),
"success": success_testcases,
- "failed": failed_testcases,
+ "errors": failed_testcases,
"skipped": skipped_testcases}
except Exception:
success_rate = 0
diff --git a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
index 67cd9415..9d723905 100644
--- a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
+++ b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
@@ -5,6 +5,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
+from functest.utils import functest_logger as ft_logger
from functest.core.pytest_suite_runner import PyTestSuiteRunner
from functest.opnfv_tests.openstack.snaps import snaps_utils
from functest.utils import functest_utils
@@ -22,9 +23,11 @@ class SnapsTestRunner(PyTestSuiteRunner):
super(SnapsTestRunner, self).__init__()
self.ext_net_name = snaps_utils.get_ext_net_name()
-
+ self.logger = ft_logger.Logger(self.project_name).getLogger()
scenario = functest_utils.get_scenario()
self.flavor_metadata = create_flavor.MEM_PAGE_SIZE_ANY
if 'ovs' in scenario or 'fdio' in scenario:
self.flavor_metadata = create_flavor.MEM_PAGE_SIZE_LARGE
+
+ self.logger.info("Using flavor metatdata '%s'" % self.flavor_metadata)
diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py
index a21322d8..f4a94f65 100644
--- a/functest/opnfv_tests/openstack/tempest/conf_utils.py
+++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py
@@ -341,7 +341,7 @@ def configure_tempest_multisite_params(tempest_conf_file):
# cmd = ("openstack endpoint show kingbird | grep publicurl |"
# "awk '{print $4}' | awk -F '/' '{print $4}'")
# kingbird_api_version = os.popen(cmd).read()
- kingbird_api_version = os_utils.get_endpoint(service_type='multisite')
+ # kingbird_api_version = os_utils.get_endpoint(service_type='multisite')
if CI_INSTALLER_TYPE == 'fuel':
# For MOS based setup, the service is accessible
@@ -392,10 +392,14 @@ def configure_tempest_multisite_params(tempest_conf_file):
config.add_section("kingbird")
except Exception:
logger.info('kingbird section exist')
+
+ # set the domain id
+ config.set('auth', 'admin_domain_name', 'default')
+
config.set('kingbird', 'endpoint_type', 'publicURL')
- config.set('kingbird', 'TIME_TO_SYNC', '20')
+ config.set('kingbird', 'TIME_TO_SYNC', '120')
config.set('kingbird', 'endpoint_url', kingbird_endpoint_url)
- config.set('kingbird', 'api_version', kingbird_api_version)
+ config.set('kingbird', 'api_version', 'v1.0')
with open(tempest_conf_file, 'wb') as config_file:
config.write(config_file)
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,