Integration testing for IPFS - IPTB vs kubernetes-ipfs vs mininet #294
Description
We've reached a point where it is becoming really hard to assert things with unit and interop tests, there are many network scenarios in which IPFS needs to be able to perform that can't be captured by those. We need integration tests.
There has been multiple endeavors started towards this end, for example IPTB and kubernetes-ipfs. These have been essential to test go-ipfs and ipfs-cluster, however, AFAIK, they don't let us create interesting network topologies.
Here is where mininet comes in, a virtual network toolkit that enables us to create all sorts of network topologies. Bonus, @mafintosh made it very easy to use through tapenet and @JGAntunes has been playing with it for a while to run tests for his M.Sc work.
I know a lot of folks here have opinions on testing and I want to make sure all of those are captured before starting yet another p2p test framework.
I've a short list with my humble requirements, these are:
- Code tests very easily and fast (writing a test shouldn't be harder than writing a unit test)
- Specify different network topologies, play with things like latency, packet loss and NAT configurations
- Run js-ipfs and go-ipfs daemons, js-ipfs instances (in process nodes), js-ipfs browser nodes (Chrome and Firefox)