Open vojtechsimetka opened 3 years ago
The orchestration of the test Bee clients along with generating its required keys are going to happen by swarm-cli
as proposed in Bee ticket #1557. identity
and docker
commands will be used for that, the remaining implementation of the latter is going to start soon #17.
In order to start the implementation of the command we need more information about swarm.key
of Bee, the discussions about it has been already started.
The test environment processes will have a different repository to keep all assets of it (smart contract codes, snapshots of Bee, etc.) there. This repository could be fetched by the CI and could be used to create test environment.
Currently #297 PR solved the flaky tests and created a faster environment by the bee-factory project with supporting the followings:
bee version
command on image build. After publish it can be used by providing BEE_VERSION
and BLOCKCHAIN_VERSION
with this special tag for using the desired environment the same way as so far.The last point is not solved in the CI image build workflow, because:
@ethersphere/js ?
I would still love to have images with state in it so that we always have the same environment to test against (and sure from time to time this will need to recreate it as the Bee evolves and has new potentially incompatible internal state). But we would have what we always wanted - predictable non-empty state against which we run tests in all of our repos (bee-js, swarm-cli, bee-dashboard...). This would also make it much simpler locally, you could just pull the images and before each test restore the state.
That being said if we go the way of generating the state before running the tests, I would still advocate to save the state between tests. So the workflow would be:
node_modules
are
Rationale: In our current tests we spawn each time new fresh network. This means we just have an empty network without any data, balances or cheques etc. Given the nature of the network, it is unrealistic to deterministically set up the network to the same state by performing actions on top of it. Therefore the approach would be to take a snapshot of the locally run environment and run tests against it.
This comes as an outcome from a testing discussion on April 7th 2021
Phases/TODO:
Local environment
CI job for cheques tests
keystore
andstatestore
of BeeCI job for feeds and other data
localstore
and use it in the CIReplace the current test environment