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

chore: Apply Testcontainers for .NET best practices #593

Merged
merged 1 commit into from
Jan 4, 2023
Merged

chore: Apply Testcontainers for .NET best practices #593

merged 1 commit into from
Jan 4, 2023

Conversation

HofmeisterAn
Copy link
Contributor

What does this PR do?

Applies Testcontainers for .NET best practices. It restructures and cleans up the Redis test fixture. The container object is not nullable, InitializeAsync and DisposeAsync can immediately return their tasks, no reason to await.

It is recommended to use Testcontainers to resolve the hostname and public mapped port. Both properties may vary due to the Docker host. E.g. the hostname is not always 127.0.0.1 or localhost.

Why is it important?

I noticed you are using Testcontainers for .NET and wanna share some best practices.

Related issues

-

@mayuki
Copy link
Member

mayuki commented Jan 4, 2023

Thanks! This is my first time using Testcontainers, so this PR was very helpful.

@mayuki mayuki merged commit f5e0300 into Cysharp:main Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants