aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/benchmark
diff options
context:
space:
mode:
authorKubi <jean.gaoliang@huawei.com>2016-11-14 10:02:33 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-11-14 10:02:33 +0000
commit293a8ed0c22d7944c8fc671792683d45d3fa8d48 (patch)
treea6e56fd46fc5bce18fc865010bb2ed4848dc4d26 /tests/unit/benchmark
parenteb527820ddb21081399b27deaacc8a651ea5f06a (diff)
parent5e49e33552c581610b1abaa2628cdf90a4ba14ac (diff)
Merge "bugfix: ipv6 should log in controller node to setup"
Diffstat (limited to 'tests/unit/benchmark')
-rw-r--r--tests/unit/benchmark/scenarios/networking/test_ping6.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/unit/benchmark/scenarios/networking/test_ping6.py b/tests/unit/benchmark/scenarios/networking/test_ping6.py
index 995113e28..0b8fba268 100644
--- a/tests/unit/benchmark/scenarios/networking/test_ping6.py
+++ b/tests/unit/benchmark/scenarios/networking/test_ping6.py
@@ -25,12 +25,29 @@ class PingTestCase(unittest.TestCase):
'host1': {
'ip': '172.16.0.137',
'user': 'cirros',
+ 'role': "Controller",
'key_filename': "mykey.key",
'password': "root"
},
+ 'host2': {
+ "ip": "172.16.0.138",
+ "key_filename": "/root/.ssh/id_rsa",
+ "role": "Compute",
+ "name": "node3.IPV6",
+ "user": "root"
+ },
}
}
+ def test_get_controller_node(self):
+ args = {
+ 'options': {'host': 'host1','packetsize': 200, 'ping_count': 5},
+ 'sla': {'max_rtt': 50}
+ }
+ p = ping6.Ping6(args, self.ctx)
+ controller_node = p._get_controller_node(['host1','host2'])
+ self.assertEqual(controller_node, 'host1')
+
@mock.patch('yardstick.benchmark.scenarios.networking.ping6.ssh')
def test_ping_successful_setup(self, mock_ssh):
args = {