Closed jamlo closed 1 month ago
Looks good overall. Nice work! Though taking 4 minutes to run just two scenarios seem too long and I hope we can improve things in upcoming iterations
@wdbaruni Thank you. I agree that the timing needs to be significantly lowered. Currently, these are the steps that occur when the suite runs:
The bacalhau project is being compiled (1 to 2 minutes). This is a temporary step that will be totally removed when we choose our CI system, which will have a build step before these tests run, and the binary will be passed down. The integraion tests will not be compiling their own bacalhau binary.
The container base images build: This step is only done one in the whole test, but still I am thinking about a way to use prebuilt container images, pull them from an image registry, and only inject them with tests assets (bacalhau binary, other specs) when the container starts. Thus reducing the overall time.
Each Test suite run is designed to run against a dedicated doeck compose stack, in series. This way if we have 20 tests in a suite, they will be using the same docker compose deployment, and not standing 20 docker compose stacks. This will show more as we add more tests.
This PR adds a test suite utilizing TestContainers. It support spinning up docker compose stacks with all bacalhau components, thus resembling production setup.
This is not a complete TestSuite, but a big initial step towards consolidating out testing and evaluating TestContainers usage.
Allow us to run integration tests against a docker compose deployment of bacalhau
Bacalhau compute/requestor configuration can be injected in the container before start. We do not need to rebuild it every time
Tests are separated into suites which allows the combination of similar tests together that will use the same docker compose deployment. Help speed up things
Docker compose deployment has a local registry as well as a minio server running. This expands out testing ability and scope.
Test Suite Works with Github Actions
Linear issue tracker: ENG-263 Github Issue: https://github.com/bacalhau-project/bacalhau/issues/4597