From 9e780199f570c4d64b66d4dba9fb6657ad33e25d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9gory=20Wisniewski?= <gregory@nexedi.com>
Date: Wed, 13 Jan 2010 15:26:55 +0000
Subject: [PATCH] SendPartitionTable packets are not allowed during client
 boostrap.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1429 71dcc9de-d417-0410-9af5-da40c76e7ee4
---
 neo/tests/client/testClientHandler.py | 46 ---------------------------
 1 file changed, 46 deletions(-)

diff --git a/neo/tests/client/testClientHandler.py b/neo/tests/client/testClientHandler.py
index 92346807..5dde0f1b 100644
--- a/neo/tests/client/testClientHandler.py
+++ b/neo/tests/client/testClientHandler.py
@@ -464,52 +464,6 @@ class ClientHandlerTests(NeoTestBase):
         # Check that partition table got cleared and ptid got updated
         self.assertEquals(app.pt.getID(), 1)
 
-    def test_unknownNodeSendPartitionTable(self):
-        test_node = Mock({'getType': NodeTypes.MASTER})
-        test_ptid = 0
-        class App:
-            nm = Mock({'getByUUID': ReturnValues(test_node, None), 'add': None})
-            pt = Mock({'setCell': None})
-            ptid = test_ptid
-        test_storage_uuid = self.getNewUUID()
-        app = App()
-        client_handler = PrimaryBootstrapHandler(app)
-        conn = self.getConnection()
-        # TODO: use realistic values
-        test_row_list = [(0, [(test_storage_uuid, 0)])]
-        client_handler.sendPartitionTable(conn, None, test_ptid, test_row_list)
-        # Check that node got created
-        add_call_list = app.nm.mockGetNamedCalls('add')
-        self.assertEquals(len(add_call_list), 1)
-        created_node = add_call_list[0].getParam(0)
-        self.assertEqual(created_node.getUUID(), test_storage_uuid)
-        # Check that partition table cell got added
-        setCell_call_list = app.pt.mockGetNamedCalls('setCell')
-        self.assertEquals(len(setCell_call_list), 1)
-        setCell_call_list[0].checkArgs(test_row_list[0][0], created_node,
-                test_row_list[0][1][0][1])
-
-    def test_knownNodeSendPartitionTable(self):
-        test_node = Mock({'getType': NodeTypes.MASTER})
-        test_ptid = 0
-        class App:
-            nm = Mock({'getByUUID': test_node, 'add': None})
-            pt = Mock({'setCell': None})
-            ptid = test_ptid
-        test_storage_uuid = self.getNewUUID()
-        app = App()
-        client_handler = PrimaryBootstrapHandler(app)
-        conn = self.getConnection()
-        # TODO: use realistic values
-        test_row_list = [(0, [(test_storage_uuid, 0)])]
-        client_handler.sendPartitionTable(conn, None, test_ptid, test_row_list)
-        # Check that node did not get created
-        self.assertEquals(len(app.nm.mockGetNamedCalls('add')), 0)
-        # Check that partition table cell got added
-        setCell_call_list = app.pt.mockGetNamedCalls('setCell')
-        self.assertEquals(len(setCell_call_list), 1)
-        setCell_call_list[0].checkArgs(test_row_list[0][0], test_node,
-                test_row_list[0][1][0][1])
 
     def test_nonMasterNotifyNodeInformation(self):
         for node_type in (NodeTypes.CLIENT, NodeTypes.STORAGE):
-- 
2.30.9