diff options
author | Ramesh Nachimuthu <rnachimu@redhat.com> | 2014-04-24 17:45:25 +0530 |
---|---|---|
committer | Bala.FA <barumuga@redhat.com> | 2014-04-29 10:21:37 +0530 |
commit | 6d9d04248ea574ffbe94edec9e552232924eb8ff (patch) | |
tree | fe6733ec91229e231ffdc85fcdf7e9bfcf86dd1c /tests/test_discovery.py | |
parent | bee9f1ffe9e1586beda00e96d9e3da6171b3ab89 (diff) |
autoconf: use host uuid to indentity bricks
Using host UUIDs to bricks in host
Change-Id: Ie5467b05391f709e292644f00495b41af8213b42
Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com>
Diffstat (limited to 'tests/test_discovery.py')
-rw-r--r-- | tests/test_discovery.py | 9 |
1 files changed, 4 insertions, 5 deletions
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']) |