From 5e49e33552c581610b1abaa2628cdf90a4ba14ac Mon Sep 17 00:00:00 2001 From: rexlee8776 Date: Tue, 8 Nov 2016 07:09:55 +0000 Subject: bugfix: ipv6 should log in controller node to setup JIRA: YARDSTICK-363 Change-Id: Ic1f2ab98425512014d746a997b7356d3490c6b33 Signed-off-by: rexlee8776 --- tests/unit/benchmark/scenarios/networking/test_ping6.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests') 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 = { -- cgit 1.2.3-korg