aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-openbaton-ha_daily.yaml62
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-ha_daily.yaml62
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-noha_daily.yaml62
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l2-moon-noha_daily.yaml62
-rw-r--r--tests/unit/network_services/helpers/test_iniparser.py (renamed from tests/unit/network_services/vnf_generic/vnf/test_iniparser.py)14
-rw-r--r--tests/unit/network_services/helpers/test_samplevnf_helper.py6
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py2
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py1
8 files changed, 261 insertions, 10 deletions
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-openbaton-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-openbaton-ha_daily.yaml
new file mode 100644
index 000000000..d1b4cce1a
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-openbaton-ha_daily.yaml
@@ -0,0 +1,62 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# os-nosdn-openbaton-ha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-nosdn-openbaton-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc002.yaml
+-
+ file_name: opnfv_yardstick_tc005.yaml
+-
+ file_name: opnfv_yardstick_tc010.yaml
+-
+ file_name: opnfv_yardstick_tc011.yaml
+-
+ file_name: opnfv_yardstick_tc012.yaml
+-
+ file_name: opnfv_yardstick_tc014.yaml
+-
+ file_name: opnfv_yardstick_tc037.yaml
+-
+ file_name: opnfv_yardstick_tc055.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5.yardstick-TC055"}'
+-
+ file_name: opnfv_yardstick_tc063.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5.yardstick-TC063"}'
+-
+ file_name: opnfv_yardstick_tc069.yaml
+-
+ file_name: opnfv_yardstick_tc070.yaml
+-
+ file_name: opnfv_yardstick_tc071.yaml
+-
+ file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-ha_daily.yaml
new file mode 100644
index 000000000..10772e0cc
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-ha_daily.yaml
@@ -0,0 +1,62 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# os-nosdn-ovs_dpdk-ha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-nosdn-ovs_dpdk-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc002.yaml
+-
+ file_name: opnfv_yardstick_tc005.yaml
+-
+ file_name: opnfv_yardstick_tc010.yaml
+-
+ file_name: opnfv_yardstick_tc011.yaml
+-
+ file_name: opnfv_yardstick_tc012.yaml
+-
+ file_name: opnfv_yardstick_tc014.yaml
+-
+ file_name: opnfv_yardstick_tc037.yaml
+-
+ file_name: opnfv_yardstick_tc055.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5.yardstick-TC055"}'
+-
+ file_name: opnfv_yardstick_tc063.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5.yardstick-TC063"}'
+-
+ file_name: opnfv_yardstick_tc069.yaml
+-
+ file_name: opnfv_yardstick_tc070.yaml
+-
+ file_name: opnfv_yardstick_tc071.yaml
+-
+ file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-noha_daily.yaml
new file mode 100644
index 000000000..9b2be3710
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-noha_daily.yaml
@@ -0,0 +1,62 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# os-nosdn-ovs_dpdk-noha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-nosdn-ovs_dpdk-noha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc002.yaml
+-
+ file_name: opnfv_yardstick_tc005.yaml
+-
+ file_name: opnfv_yardstick_tc010.yaml
+-
+ file_name: opnfv_yardstick_tc011.yaml
+-
+ file_name: opnfv_yardstick_tc012.yaml
+-
+ file_name: opnfv_yardstick_tc014.yaml
+-
+ file_name: opnfv_yardstick_tc037.yaml
+-
+ file_name: opnfv_yardstick_tc055.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5.yardstick-TC055"}'
+-
+ file_name: opnfv_yardstick_tc063.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5.yardstick-TC063"}'
+-
+ file_name: opnfv_yardstick_tc069.yaml
+-
+ file_name: opnfv_yardstick_tc070.yaml
+-
+ file_name: opnfv_yardstick_tc071.yaml
+-
+ file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-moon-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-moon-noha_daily.yaml
new file mode 100644
index 000000000..cff147720
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l2-moon-noha_daily.yaml
@@ -0,0 +1,62 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# os-odl_l2-moon-noha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-odl_l2-moon-noha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc002.yaml
+-
+ file_name: opnfv_yardstick_tc005.yaml
+-
+ file_name: opnfv_yardstick_tc010.yaml
+-
+ file_name: opnfv_yardstick_tc011.yaml
+-
+ file_name: opnfv_yardstick_tc012.yaml
+-
+ file_name: opnfv_yardstick_tc014.yaml
+-
+ file_name: opnfv_yardstick_tc037.yaml
+-
+ file_name: opnfv_yardstick_tc055.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5.yardstick-TC055"}'
+-
+ file_name: opnfv_yardstick_tc063.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5.yardstick-TC063"}'
+-
+ file_name: opnfv_yardstick_tc069.yaml
+-
+ file_name: opnfv_yardstick_tc070.yaml
+-
+ file_name: opnfv_yardstick_tc071.yaml
+-
+ file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_iniparser.py b/tests/unit/network_services/helpers/test_iniparser.py
index 1ad8df9c6..bd27b497e 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_iniparser.py
+++ b/tests/unit/network_services/helpers/test_iniparser.py
@@ -27,10 +27,10 @@ stl_patch = mock.patch.dict("sys.modules", STL_MOCKS)
stl_patch.start()
if stl_patch:
- from yardstick.network_services.vnf_generic.vnf.iniparser import ParseError
- from yardstick.network_services.vnf_generic.vnf.iniparser import LineParser
- from yardstick.network_services.vnf_generic.vnf.iniparser import BaseParser
- from yardstick.network_services.vnf_generic.vnf.iniparser import ConfigParser
+ from yardstick.network_services.helpers.iniparser import ParseError
+ from yardstick.network_services.helpers.iniparser import LineParser
+ from yardstick.network_services.helpers.iniparser import BaseParser
+ from yardstick.network_services.helpers.iniparser import ConfigParser
PARSE_TEXT_1 = """\
@@ -141,7 +141,7 @@ class TestConfigParser(unittest.TestCase):
return internal_open
- @mock.patch('yardstick.network_services.vnf_generic.vnf.iniparser.open')
+ @mock.patch('yardstick.network_services.helpers.iniparser.open')
def test_parse(self, mock_open):
mock_open.side_effect = self.make_open(PARSE_TEXT_1)
@@ -182,7 +182,7 @@ class TestConfigParser(unittest.TestCase):
self.assertEqual(config_parser.find_section_index('section1'), 1)
self.assertEqual(config_parser.find_section_index('section3'), -1)
- @mock.patch('yardstick.network_services.vnf_generic.vnf.iniparser.open')
+ @mock.patch('yardstick.network_services.helpers.iniparser.open')
def test_parse_2(self, mock_open):
mock_open.side_effect = self.make_open(PARSE_TEXT_2)
@@ -200,7 +200,7 @@ class TestConfigParser(unittest.TestCase):
self.assertEqual(config_parser.sections, expected)
- @mock.patch('yardstick.network_services.vnf_generic.vnf.iniparser.open')
+ @mock.patch('yardstick.network_services.helpers.iniparser.open')
def test_parse_negative(self, mock_open):
bad_text_dict = {
'no section': PARSE_TEXT_BAD_1,
diff --git a/tests/unit/network_services/helpers/test_samplevnf_helper.py b/tests/unit/network_services/helpers/test_samplevnf_helper.py
index 0ac363f28..bff3a7722 100644
--- a/tests/unit/network_services/helpers/test_samplevnf_helper.py
+++ b/tests/unit/network_services/helpers/test_samplevnf_helper.py
@@ -211,6 +211,7 @@ class TestMultiPortConfig(unittest.TestCase):
opnfv_vnf.generate_script_data = \
mock.Mock(return_value={'link_config': 0, 'arp_config': '',
'arp_config6': '', 'actions': '',
+ 'arp_route_tbl': '', 'arp_route_tbl6': '',
'rules': ''})
opnfv_vnf.port_pair_list = [("xe0", "xe1")]
self.assertIsNotNone(opnfv_vnf.generate_script(self.VNFD))
@@ -823,8 +824,9 @@ class TestMultiPortConfig(unittest.TestCase):
opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock)
opnfv_vnf.all_ports = [3, 2, 5]
- expected = '(0a141000,fffff000,32,0a141e28) (0ac81e00,ffffff00,1,0ac81e28) ' \
- '(0a000000,ff000000,987,0a140328)'
+ expected = 'routeadd net 32 10.20.30.40 0xfffff000\n' \
+ 'routeadd net 1 10.200.30.40 0xffffff00\n' \
+ 'routeadd net 987 10.20.3.40 0xff000000'
result = opnfv_vnf.generate_arp_route_tbl()
self.assertEqual(result, expected)
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py
index 09060ff57..a6d40877d 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py
@@ -376,7 +376,7 @@ class TestProxApproxVnf(unittest.TestCase):
return file_path
@mock.patch('yardstick.benchmark.scenarios.networking.vnf_generic.open', create=True)
- @mock.patch('yardstick.network_services.vnf_generic.vnf.iniparser.open', create=True)
+ @mock.patch('yardstick.network_services.helpers.iniparser.open', create=True)
@mock.patch(SSH_HELPER)
def test_run_prox(self, ssh, *_):
mock_ssh(ssh)
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py
index 1e6bc1a13..c41da2c45 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py
@@ -1886,6 +1886,7 @@ class TestSampleVnf(unittest.TestCase):
vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
sample_vnf = SampleVNF('vnf1', vnfd)
sample_vnf.APP_NAME = 'sample1'
+ sample_vnf.WAIT_TIME_FOR_SCRIPT = 0
sample_vnf._start_server = mock.Mock(return_value=0)
sample_vnf._vnf_process = mock.MagicMock()
sample_vnf._vnf_process.exitcode = 0