From 6d9d04248ea574ffbe94edec9e552232924eb8ff Mon Sep 17 00:00:00 2001 From: Ramesh Nachimuthu Date: Thu, 24 Apr 2014 17:45:25 +0530 Subject: autoconf: use host uuid to indentity bricks Using host UUIDs to bricks in host Change-Id: Ie5467b05391f709e292644f00495b41af8213b42 Signed-off-by: Ramesh Nachimuthu --- tests/test_discovery.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tests/test_discovery.py') diff --git a/tests/test_discovery.py b/tests/test_discovery.py index 0443cde..bcb5419 100644 --- a/tests/test_discovery.py +++ b/tests/test_discovery.py @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # -import mock from plugins import discovery from testrunner import PluginsTestCase as TestCaseBase @@ -45,7 +44,8 @@ class TestDiscovery(TestCaseBase): def _getPeers(self): result = [] - result.append({"hostip": "172.16.53.2"}) + result.append({"hostip": "lo", "uuid": "0000-1111"}) + result.append({"hostip": "172.16.53.2", "uuid": "0000-1112"}) return result def _getHostParams(self, hostip): @@ -56,9 +56,8 @@ class TestDiscovery(TestCaseBase): def _verifyClusterData(self, clusterdata, clusterName, host): - self.assertEqual(clusterdata['hosts'][0]['hostip'], - self._getPeers()[0]['hostip']) - self.assertEqual(clusterdata['hosts'][1]['hostip'], host) + self.assertEqual(clusterdata['name'], clusterName) + self.assertEqual(clusterdata['hosts'][0]['hostip'], host) for host in clusterdata['hosts']: hostDetails = self._getHostParams(host['hostip']) self.assertEqual(host['hostname'], hostDetails['hostname']) -- cgit