This PR will allow us to test from the top down (from the blueprint-manager to the individual gadgets receiving and executing jobs). It does so by setting up a locally-running node, then, for each test, run N validators by executing a future that represents the execution of the blueprint-manager (not in a separate process, since that would be unneeded. Each blueprint-manager will be responsible for spawning gadgets, which will be handled using child processes, thus, there is no need for a deeper process tree).
From the notes in the blueprint-manager, it will:
Query to get Vec<RpcServicesWithBlueprint>
For each RpcServicesWithBlueprint, fetch the associated gadget binary (fetch/download)
-> If the services field is empty, just emit and log inside the executed binary "that states a new service instance got
created by one of these blueprints"
-> If the services field is not empty, for each service in RpcServicesWithBlueprint.services, spawn the gadget binary, using params to set the service id and job id to listen and execute)
-> Manage the lifetime of these processes as necessary
The PR will allow a similar approach to the testing-externalities approach in a single integration test.
This PR will allow us to test from the top down (from the blueprint-manager to the individual gadgets receiving and executing jobs). It does so by setting up a locally-running node, then, for each test, run
N
validators by executing a future that represents the execution of the blueprint-manager (not in a separate process, since that would be unneeded. Each blueprint-manager will be responsible for spawning gadgets, which will be handled using child processes, thus, there is no need for a deeper process tree).From the notes in the blueprint-manager, it will:
Vec<RpcServicesWithBlueprint>
RpcServicesWithBlueprint
, fetch the associated gadget binary (fetch/download) -> If the services field is empty, just emit and log inside the executed binary "that states a new service instance got created by one of these blueprints" -> If the services field is not empty, for each service inRpcServicesWithBlueprint.services
, spawn the gadget binary, using params to set the service id and job id to listen and execute) -> Manage the lifetime of these processes as necessaryThe PR will allow a similar approach to the testing-externalities approach in a single integration test.
This PR closes #207 , #208 , #209 , #210 , #211 , #212