« Previous | Next » 

Revision d45574de

IDd45574de156bec9c17d2910c380c9a30fb25027c
Parent 34be621a
Child 4256f8fe

Added by Sebastian Gebhard over 8 years ago

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 <>
Signed-off-by: Sebastian Gebhard <>
Signed-off-by: Klaus Aehlig <>
Reviewed-by: Klaus Aehlig <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences