diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_config_generator.py | 5 | ||||
-rw-r--r-- | tests/test_discovery.py | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/tests/test_config_generator.py b/tests/test_config_generator.py index 9d6d1ab..d54ddfe 100644 --- a/tests/test_config_generator.py +++ b/tests/test_config_generator.py @@ -17,6 +17,7 @@ # from plugins import config_generator +from glusternagios.glustercli import HostStatus from testrunner import PluginsTestCase as TestCaseBase @@ -116,10 +117,14 @@ class TestGlusterNagiosConfManager(TestCaseBase): cluster = {'name': 'Test-Cluster', 'hosts': [], 'volumes': []} cluster['hosts'].append({'hostip': '10.70.43.1', 'hostname': 'host-1', + 'uuid': '0000-1111', + 'status': HostStatus.CONNECTED, 'bricks': self.createBricks(1, "Volume1", '10.70.43.1')}) cluster['hosts'].append({'hostip': '10.70.43.2', 'hostname': 'host-2', + 'status': HostStatus.CONNECTED, + 'uuid': '0000-1112', 'bricks': self.createBricks(2, "Volume1", '10.70.43.2')}) cluster['volumes'].append({'name': 'Volume1', "type": "Replicate"}) diff --git a/tests/test_discovery.py b/tests/test_discovery.py index 122d8a1..5e03732 100644 --- a/tests/test_discovery.py +++ b/tests/test_discovery.py @@ -17,6 +17,7 @@ # from plugins import discovery +from glusternagios.glustercli import HostStatus from testrunner import PluginsTestCase as TestCaseBase @@ -63,8 +64,10 @@ class TestDiscovery(TestCaseBase): def _getPeers(self): result = [] - result.append({"hostip": "lo", "uuid": "0000-1111"}) - result.append({"hostip": "172.16.53.2", "uuid": "0000-1112"}) + result.append({"hostip": "lo", "uuid": "0000-1111", + 'status': HostStatus.CONNECTED}) + result.append({"hostip": "172.16.53.2", "uuid": "0000-1112", + 'status': HostStatus.CONNECTED}) return result def _getHostParams(self, hostip): |