I am writing a test for flows using MockNetwork. There is a counter-flow on one of the mock nodes that is using CorDapp's CordappContext.config
to determine the course of action. I am looking for a way to pass config parameters into the CorDapps on individual mock nodes. It does not look like there is a way of doing so through MockNodeConfigOverrides
, and TestCordapp.withConfig(...)
only seems to apply to the network level. What am I missing?
It is possible to have different config map to CorDapps installed on different mock nodes. This has to be done through TestCordapp.withConfig(...)
passed into MockNodeParameters.additionalCordapps
when creating each individual node, as opposed to MockNetworkParameters.cordappsForAllNodes
. Effectively the same TestCordapp needs to be applied to each mock node but the config map will be different.