p2p/simulations: add mocker functionality#15207
Conversation
|
looks good to me but let's approve this after the demo on Monday |
There was a problem hiding this comment.
Add a return after rendering the error.
There was a problem hiding this comment.
This should be a 400 Bad Request.
There was a problem hiding this comment.
This should be a 400 Bad Request.
There was a problem hiding this comment.
that's probably a remnant of the time where there was no ticker to determine start/stop.
There was a problem hiding this comment.
This should wait for the expected node up events (it isn't guaranteed that 3s is long enough to wait).
There was a problem hiding this comment.
Check the status of the returned HTTP response.
There was a problem hiding this comment.
Check the status of the returned HTTP response.
There was a problem hiding this comment.
This should be in a defer right after starting the network so it is stopped if the test fails.
There was a problem hiding this comment.
Just re-initialize the two maps.
|
Rebased, lint issues fixed. |
cobordism
left a comment
There was a problem hiding this comment.
re-approved after rebase
This commit adds mocker functionality to p2p/simulations. A mocker allows to starting/stopping of nodes via the HTTP API.
This commit adds mocker functionality to p2p/simulations. A mocker allows to starting/stopping of nodes via the HTTP API.
This PR adds mocker functionality to the simulations package. This allows to start/stop nodes via HTTP API.
It also brings back the
state.gofile into p2p/simulations/adatpers, which got lost during merge.Finally, also fixes a bug on snapshot upload to the simulation, in that the upload would fail if there was a node in "down" state in the snapshot, but a "up" state connection would point to it.