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

Migrate Redis tests to Testcontainers #2345

Merged
merged 2 commits into from
Dec 17, 2024
Merged

Conversation

Alirexaa
Copy link
Collaborator

What this PR does / why we need it:
This pull request includes several changes to integrate Testcontainers for Redis in the health checks testing suite. The most important changes include adding a new fixture for Redis containers, updating test cases to use the fixture, and modifying configuration files to include the new dependencies.

Integration of Testcontainers for Redis:

Updates to test cases:

Configuration changes:

Which issue(s) this PR fixes:

Contributes to #2335

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Unit tests passing
  • End-to-end tests passing
  • Extended the documentation
  • Provided sample for the feature

@Alirexaa Alirexaa requested a review from adamsitnik December 16, 2024 18:03
@Alirexaa Alirexaa self-assigned this Dec 16, 2024
@github-actions github-actions bot added the github_actions Pull requests that update Github_actions code label Dec 16, 2024
@Alirexaa Alirexaa mentioned this pull request Dec 16, 2024
71 tasks
Copy link
Collaborator

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks VERY clean and simple, great work @Alirexaa !

Which OS have you used it to test it locally?
What is needed to run it on Windows? WSL 2?

Do you think that testing other health checks that don't have a dedicated Testcontainers package (like Testcontainers.Redis here) is also going to be that simple?

@Alirexaa
Copy link
Collaborator Author

Alirexaa commented Dec 16, 2024

Which OS have you used it to test it locally? What is needed to run it on Windows? WSL 2?

Windows 10 with docker desktop. WSL 2 is necessary.

The tests must be run on a machine with Docker already installed.

Do you think that testing other health checks that don't have a dedicated Testcontainers package (like Testcontainers.Redis here) is also going to be that simple?

Most of them yes. Some of them may need more work to do.

@adamsitnik, There are some examples you can take a look at.
See:

https://github.com/dotnet/aspire/blob/39912824d33de54be24baf842bf9228a6a84ac33/tests/Aspire.Qdrant.Client.Tests/QdrantContainerFixture.cs

https://github.com/CommunityToolkit/Aspire/blob/f1abddb99ee3f966677b8e8c933f7842065e6b83/tests/CommunityToolkit.Aspire.Meilisearch.Tests/MeilisearchContainerFixture.cs

https://github.com/CommunityToolkit/Aspire/blob/f1abddb99ee3f966677b8e8c933f7842065e6b83/tests/CommunityToolkit.Aspire.OllamaSharp.Tests/OllamaContainerFeature.cs

https://github.com/CommunityToolkit/Aspire/blob/f1abddb99ee3f966677b8e8c933f7842065e6b83/tests/CommunityToolkit.Aspire.EventStore.Tests/EventStoreContainerFixture.cs

Copy link
Collaborator

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you very much @Alirexaa !

@adamsitnik adamsitnik merged commit f54852f into master Dec 17, 2024
57 checks passed
@adamsitnik adamsitnik deleted the alirexaa/redis-testcontainer branch December 17, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update Github_actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants