Revision d45574de
ID | d45574de156bec9c17d2910c380c9a30fb25027c |
Parent | 34be621a |
Child | 4256f8fe |
Mock RPC for unit tests
This patch enables patching the rpc module to create a mocked version
which can be used to mock a rpc.DnsOnlyRunner(). This is needed for
unit testing LUNodeAdd, as it need to run RPCs against nodes not yet
present in the configuration.
Also, the default return IP of _GetHostnameMock needs to be changed, since
x.x.x.1 is the default IP of the first mocked node and will cause problems.
Parts of this patch were written by Thomas Thrainer.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Files
- added
- modified
- copied
- renamed
- deleted