« Previous | Next » 

Revision d45574de

Parent 34be621a
Child 4256f8fe

Added by Sebastian Gebhard about 10 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 <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences