summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_discovery.py9
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'])