Commit 32106471 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Fix node list structure, address is now a tuple instead of two items.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1413 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 986b3db0
......@@ -538,8 +538,8 @@ class ClientHandlerTests(NeoTestBase):
conn, None, None)
def _testNotifyNodeInformation(self, test_node, getByAddress=None, getByUUID=MARKER):
invalid_uid_test_node = (test_node[0], test_node[1], test_node[2] + 1,
INVALID_UUID, test_node[4])
invalid_uid_test_node = (test_node[0], (test_node[1][0],
test_node[1][1] + 1), INVALID_UUID, test_node[3])
test_node_list = [test_node, invalid_uid_test_node]
test_master_uuid = self.getNewUUID()
node = Mock({'getType': NodeTypes.MASTER})
......@@ -561,7 +561,7 @@ class ClientHandlerTests(NeoTestBase):
def test_unknownMasterNotifyNodeInformation(self):
# first notify unknown master nodes
uuid = self.getNewUUID()
test_node = (NodeTypes.MASTER, '127.0.0.1', 10010, uuid,
test_node = (NodeTypes.MASTER, ('127.0.0.1', 10010), uuid,
NodeStates.RUNNING)
nm = self._testNotifyNodeInformation(test_node, getByUUID=None)
# Check that two nodes got added (second is with INVALID_UUID)
......@@ -575,7 +575,7 @@ class ClientHandlerTests(NeoTestBase):
def test_knownMasterNotifyNodeInformation(self):
node = Mock({})
uuid = self.getNewUUID()
test_node = (NodeTypes.MASTER, '127.0.0.1', 10010, uuid,
test_node = (NodeTypes.MASTER, ('127.0.0.1', 10010), uuid,
NodeStates.RUNNING)
nm = self._testNotifyNodeInformation(test_node, getByAddress=node,
getByUUID=node)
......@@ -590,7 +590,7 @@ class ClientHandlerTests(NeoTestBase):
self.assertEqual(setState_call_list[0].getParam(0), test_node[4])
def test_unknownStorageNotifyNodeInformation(self):
test_node = (NodeTypes.STORAGE, '127.0.0.1', 10010, self.getNewUUID(),
test_node = (NodeTypes.STORAGE, ('127.0.0.1', 10010), self.getNewUUID(),
NodeStates.RUNNING)
nm = self._testNotifyNodeInformation(test_node, getByUUID=None)
# Check that node got added
......@@ -605,7 +605,7 @@ class ClientHandlerTests(NeoTestBase):
def test_knownStorageNotifyNodeInformation(self):
node = Mock({'setState': None, 'setAddress': None})
test_node = (NodeTypes.STORAGE, '127.0.0.1', 10010, self.getNewUUID(),
test_node = (NodeTypes.STORAGE, ('127.0.0.1', 10010), self.getNewUUID(),
NodeStates.RUNNING)
nm = self._testNotifyNodeInformation(test_node, getByUUID=node)
# Check that node got replaced
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment