Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore TestContainers to Utilize in Testing Strategy #4597

Closed
jamlo opened this issue Oct 7, 2024 · 0 comments
Closed

Explore TestContainers to Utilize in Testing Strategy #4597

jamlo opened this issue Oct 7, 2024 · 0 comments
Assignees
Labels
request/new Request: Indicates a new request that has been submitted and awaits initial triage type/enhancement Type: New features or enhancements to existing features

Comments

@jamlo
Copy link
Contributor

jamlo commented Oct 7, 2024

Is your feature request related to a problem? Please describe

Since we can utilize Docker Compose in running a complete deployment of Bacalhau (see #4595 ) , it would be beneficial if we can incorporate it in our testing strategy.

Describe the solution you'd like:

TestContainers is a widely used testing framework within the Container development space. It also has a first class support for Docker Compose.

In this issue, we will explore how can we utilize TestContainers and Docker Compose in our test suite.

Describe alternatives you've considered

Alternatives would be to build from scratch a golang test suite to test containers and/or docker compose deployments, or to spin up Bacalhau components as separate processes on the host and test them.

Additional context

  1. Need to look into the DevStack and the Bashtubs tests that are currently being utilized.
@jamlo jamlo added type/enhancement Type: New features or enhancements to existing features request/new Request: Indicates a new request that has been submitted and awaits initial triage labels Oct 7, 2024
@jamlo jamlo self-assigned this Oct 7, 2024
@jamlo jamlo moved this from Inbox to In Progress in Engineering Planning Oct 7, 2024
jamlo added a commit that referenced this issue Oct 11, 2024
This is a working commit that utilizes TestContainers to run integration
Tests. Please note that the code is still not cleaned and WIP.

Features:
1- Allow us to run integration tests against a docker compose
   deployment of bacalhau

2- Bacalhau compute/requestor configuration can be injected in the
   container before start. We do not need to rebuild it every time

3- 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

4- Docker compose deployment has a local registry as well as a minio
   server running. This expands out testing ability and scope.

Outstanding items:
1- Minimize the running time.
2- Try to deploy that on buildkite and Github Actions to see how it will
   behave

Issue #4597
jamlo added a commit that referenced this issue Oct 14, 2024
jamlo added a commit that referenced this issue Oct 15, 2024
1- Allow us to run integration tests against a docker compose
   deployment of bacalhau

2- Bacalhau compute/requestor configuration can be injected in the
   container before start. We do not need to rebuild it every time

3- 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

4- Docker compose deployment has a local registry as well as a minio
   server running. This expands out testing ability and scope.

5- Test Suite Works with Github Actions

Linear issue tracker: ENG-263
Github Issue: #4597
jamlo added a commit that referenced this issue Oct 15, 2024
jamlo added a commit that referenced this issue Oct 15, 2024
jamlo added a commit that referenced this issue Oct 16, 2024
**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.

1. Allow us to run integration tests against a docker compose
deployment of bacalhau

2. Bacalhau compute/requestor configuration can be injected in the
container before start. We do not need to rebuild it every time

3. 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

4. Docker compose deployment has a local registry as well as a minio
server running. This expands out testing ability and scope.

5. Test Suite Works with Github Actions

Linear issue tracker: https://linear.app/expanso/issue/ENG-263/explore-testcontainers-to-utilize-in-testing-strategy
Github Issue: #4597
@linear linear bot closed this as completed Oct 16, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Engineering Planning Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request/new Request: Indicates a new request that has been submitted and awaits initial triage type/enhancement Type: New features or enhancements to existing features
Projects
Status: Done
Development

No branches or pull requests

1 participant