summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfunctest/ci/testcases.yaml17
-rw-r--r--functest/opnfv_tests/openstack/snaps/api_check.py9
-rw-r--r--functest/opnfv_tests/openstack/snaps/connection_check.py9
-rw-r--r--functest/opnfv_tests/openstack/snaps/health_check.py5
-rw-r--r--functest/opnfv_tests/openstack/snaps/smoke.py13
-rw-r--r--functest/opnfv_tests/openstack/snaps/snaps_test_runner.py12
-rw-r--r--functest/opnfv_tests/openstack/snaps/snaps_utils.py8
7 files changed, 45 insertions, 28 deletions
diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml
index febe15706..39988306f 100755
--- a/functest/ci/testcases.yaml
+++ b/functest/ci/testcases.yaml
@@ -333,6 +333,23 @@ tiers:
cmd: '. /home/opnfv/functest/conf/stackrc && cd /home/opnfv/repos/securityscanning && python security_scan.py --config config.ini && cd -'
-
+ case_name: copper
+ project_name: copper
+ criteria: 'status == "PASS"'
+ blocking: false
+ clean_flag: true
+ description: >-
+ Test suite for policy management based on OpenStack Congress
+ dependencies:
+ installer: 'apex'
+ scenario: '^((?!fdio).)*$'
+ run:
+ module: 'functest.core.feature'
+ class: 'BashFeature'
+ args:
+ cmd: 'cd /home/opnfv/repos/copper/tests && bash run.sh && cd -'
+
+ -
case_name: multisite
project_name: multisite
criteria: 'success_rate == 100%'
diff --git a/functest/opnfv_tests/openstack/snaps/api_check.py b/functest/opnfv_tests/openstack/snaps/api_check.py
index bceb7c1d3..50f67094b 100644
--- a/functest/opnfv_tests/openstack/snaps/api_check.py
+++ b/functest/opnfv_tests/openstack/snaps/api_check.py
@@ -11,7 +11,6 @@ from snaps import test_suite_builder
from functest.opnfv_tests.openstack.snaps.snaps_test_runner import \
SnapsTestRunner
-from functest.utils.constants import CONST
class ApiCheck(SnapsTestRunner):
@@ -28,7 +27,7 @@ class ApiCheck(SnapsTestRunner):
self.suite = unittest.TestSuite()
test_suite_builder.add_openstack_api_tests(
- self.suite,
- CONST.openstack_creds,
- self.ext_net_name,
- use_keystone=CONST.snaps_use_keystone)
+ suite=self.suite,
+ os_creds=self.os_creds,
+ ext_net_name=self.ext_net_name,
+ use_keystone=self.use_keystone)
diff --git a/functest/opnfv_tests/openstack/snaps/connection_check.py b/functest/opnfv_tests/openstack/snaps/connection_check.py
index 0607beb32..f2753aea4 100644
--- a/functest/opnfv_tests/openstack/snaps/connection_check.py
+++ b/functest/opnfv_tests/openstack/snaps/connection_check.py
@@ -11,7 +11,6 @@ from snaps import test_suite_builder
from functest.opnfv_tests.openstack.snaps.snaps_test_runner import \
SnapsTestRunner
-from functest.utils.constants import CONST
class ConnectionCheck(SnapsTestRunner):
@@ -28,7 +27,7 @@ class ConnectionCheck(SnapsTestRunner):
self.suite = unittest.TestSuite()
test_suite_builder.add_openstack_client_tests(
- self.suite,
- CONST.openstack_creds,
- self.ext_net_name,
- use_keystone=CONST.snaps_use_keystone)
+ suite=self.suite,
+ os_creds=self.os_creds,
+ ext_net_name=self.ext_net_name,
+ use_keystone=self.use_keystone)
diff --git a/functest/opnfv_tests/openstack/snaps/health_check.py b/functest/opnfv_tests/openstack/snaps/health_check.py
index 245f50525..44e3b876b 100644
--- a/functest/opnfv_tests/openstack/snaps/health_check.py
+++ b/functest/opnfv_tests/openstack/snaps/health_check.py
@@ -34,7 +34,8 @@ class HealthCheck(SnapsTestRunner):
self.suite.addTest(
OSIntegrationTestCase.parameterize(
- SimpleHealthCheck, CONST.openstack_creds, self.ext_net_name,
- use_keystone=CONST.snaps_use_keystone,
+ SimpleHealthCheck, os_creds=self.os_creds,
+ ext_net_name=self.ext_net_name,
+ use_keystone=self.use_keystone,
flavor_metadata=self.flavor_metadata,
image_metadata=image_custom_config))
diff --git a/functest/opnfv_tests/openstack/snaps/smoke.py b/functest/opnfv_tests/openstack/snaps/smoke.py
index ceead6bb1..5a637f288 100644
--- a/functest/opnfv_tests/openstack/snaps/smoke.py
+++ b/functest/opnfv_tests/openstack/snaps/smoke.py
@@ -27,7 +27,6 @@ class SnapsSmoke(SnapsTestRunner):
super(SnapsSmoke, self).__init__(**kwargs)
self.suite = unittest.TestSuite()
- use_fip = CONST.snaps_use_floating_ips
# The snaps smoke test uses the same config as the
# snaps_health_check suite, so reuse it here
@@ -37,15 +36,15 @@ class SnapsSmoke(SnapsTestRunner):
# Tests requiring floating IPs leverage files contained within the
# SNAPS repository and are found relative to that path
- if use_fip:
+ if self.use_fip:
snaps_dir = CONST.dir_repo_snaps + '/snaps'
os.chdir(snaps_dir)
test_suite_builder.add_openstack_integration_tests(
- self.suite,
- CONST.openstack_creds,
- self.ext_net_name,
- use_keystone=CONST.snaps_use_keystone,
+ suite=self.suite,
+ os_creds=self.os_creds,
+ ext_net_name=self.ext_net_name,
+ use_keystone=self.use_keystone,
flavor_metadata=self.flavor_metadata,
image_metadata=image_custom_config,
- use_floating_ips=use_fip)
+ use_floating_ips=self.use_fip)
diff --git a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
index 2068852e3..b17aab0c0 100644
--- a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
+++ b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
@@ -5,12 +5,13 @@
#
# 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
+from functest.utils.constants import CONST
from snaps.openstack import create_flavor
+from snaps.openstack.tests import openstack_tests
class SnapsTestRunner(PyTestSuiteRunner):
@@ -22,8 +23,13 @@ class SnapsTestRunner(PyTestSuiteRunner):
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()
+ self.os_creds = openstack_tests.get_credentials(
+ os_env_file=CONST.openstack_creds, proxy_settings_str=None,
+ ssh_proxy_cmd=None)
+
+ self.ext_net_name = snaps_utils.get_ext_net_name(self.os_creds)
+ self.use_fip = CONST.snaps_use_floating_ips
+ self.use_keystone = CONST.snaps_use_keystone
scenario = functest_utils.get_scenario()
self.flavor_metadata = create_flavor.MEM_PAGE_SIZE_ANY
diff --git a/functest/opnfv_tests/openstack/snaps/snaps_utils.py b/functest/opnfv_tests/openstack/snaps/snaps_utils.py
index 4ea1a04ad..327ba073d 100644
--- a/functest/opnfv_tests/openstack/snaps/snaps_utils.py
+++ b/functest/opnfv_tests/openstack/snaps/snaps_utils.py
@@ -5,19 +5,15 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
-from snaps.openstack.tests import openstack_tests
from snaps.openstack.utils import neutron_utils
-from functest.utils.constants import CONST
-
-def get_ext_net_name():
+def get_ext_net_name(os_creds):
"""
Returns the first external network name
+ :param: os_creds: an instance of snaps OSCreds object
:return:
"""
- os_env_file = CONST.openstack_creds
- os_creds = openstack_tests.get_credentials(os_env_file=os_env_file)
neutron = neutron_utils.neutron_client(os_creds)
ext_nets = neutron_utils.get_external_networks(neutron)
return ext_nets[0]['network']['name']