summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-02-06 10:47:38 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-06 10:47:38 +0000
commit50d5df866dca863106dd6b39457dbd22f8179e70 (patch)
tree2d374b882d7dfedb91070dfd6cd8f796c1fa50ff
parent0088e1419c7ae725071bc70d4940ed52e9a65e8e (diff)
parent6626f68e785e61de05bdafee68bafe14f66a78a7 (diff)
Merge "Add netvirt to odl tests"
-rwxr-xr-xfunctest/ci/exec_test.sh4
-rwxr-xr-xfunctest/opnfv_tests/sdn/odl/odl.py2
-rw-r--r--functest/tests/unit/odl/test_odl.py14
3 files changed, 19 insertions, 1 deletions
diff --git a/functest/ci/exec_test.sh b/functest/ci/exec_test.sh
index b288fe367..6a2b55a29 100755
--- a/functest/ci/exec_test.sh
+++ b/functest/ci/exec_test.sh
@@ -54,6 +54,10 @@ function odl_tests(){
odl_ip=$SDN_CONTROLLER_IP
odl_port=8081
odl_restport=8081
+ elif [ "$INSTALLER_TYPE" == "netvirt" ]; then
+ odl_ip=$SDN_CONTROLLER_IP
+ odl_port=8081
+ odl_restport=8081
elif [ "$INSTALLER_TYPE" == "joid" ]; then
odl_ip=$SDN_CONTROLLER
elif [ "$INSTALLER_TYPE" == "compass" ]; then
diff --git a/functest/opnfv_tests/sdn/odl/odl.py b/functest/opnfv_tests/sdn/odl/odl.py
index 9502be93f..250759572 100755
--- a/functest/opnfv_tests/sdn/odl/odl.py
+++ b/functest/opnfv_tests/sdn/odl/odl.py
@@ -164,7 +164,7 @@ class ODLTests(testcase_base.TestcaseBase):
kwargs['ospassword'] = os.environ['OS_PASSWORD']
if installer_type == 'fuel':
kwargs['odlwebport'] = '8282'
- elif installer_type == 'apex':
+ elif installer_type == 'apex' or installer_type == 'netvirt':
kwargs['odlip'] = os.environ['SDN_CONTROLLER_IP']
kwargs['odlwebport'] = '8081'
kwargs['odlrestconfport'] = '8081'
diff --git a/functest/tests/unit/odl/test_odl.py b/functest/tests/unit/odl/test_odl.py
index 810b35920..8f2a5d7e4 100644
--- a/functest/tests/unit/odl/test_odl.py
+++ b/functest/tests/unit/odl/test_odl.py
@@ -443,6 +443,20 @@ class ODLTesting(unittest.TestCase):
odlip=self._sdn_controller_ip, odlwebport='8081',
odlrestconfport='8081')
+ def test_run_netvirt_missing_sdn_controller_ip(self):
+ with mock.patch('functest.utils.openstack_utils.get_endpoint',
+ side_effect=self._fake_url_for):
+ os.environ["INSTALLER_TYPE"] = "netvirt"
+ self.assertEqual(self.test.run(),
+ testcase_base.TestcaseBase.EX_RUN_ERROR)
+
+ def test_run_netvirt(self):
+ os.environ["SDN_CONTROLLER_IP"] = self._sdn_controller_ip
+ os.environ["INSTALLER_TYPE"] = "netvirt"
+ self._test_run(testcase_base.TestcaseBase.EX_OK,
+ odlip=self._sdn_controller_ip, odlwebport='8081',
+ odlrestconfport='8081')
+
def test_run_joid_missing_sdn_controller(self):
with mock.patch('functest.utils.openstack_utils.get_endpoint',
side_effect=self._fake_url_for):