testcontainers / testcontainers-dotnet

A library to support tests with throwaway instances of Docker containers for all compatible .NET Standard versions.
https://dotnet.testcontainers.org
MIT License
3.77k stars 271 forks source link

feat(Azurite): Add in-memory support #1063

Closed Xzelsius closed 10 months ago

Xzelsius commented 10 months ago

What does this PR do?

Updates the default Azurite image to v3.28.0 Additionally, adds support for the new in-memory persistence flag --inMemoryPersistence

The new in-memory persistence is opt-in and needs to be enabled using .WithInMemoryPersistence() on the Azurite builder. As default, the memory limit is 50% of the available Docker host RAM, but it can be overridden by specifying it in the .WithInMemoryPersistence(<memory-limit-in-mb>) call.

Why is it important?

Using in-memory persistence may have a positive effect on overall performance of Azurite during tests, as it does not need to store stuff on disk.

Related issues

netlify[bot] commented 10 months ago

Deploy Preview for testcontainers-dotnet ready!

Name Link
Latest commit 36d7b23c6ded67d8ad4d8823b2007df0c67c21bc
Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/6570bbcd70ae840008dd1442
Deploy Preview https://deploy-preview-1063--testcontainers-dotnet.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

HofmeisterAn commented 10 months ago

I made slight changes to the tests. Instead of creating a new class, we can reuse the previous test class. Does the PR look good to you? What do you think? I am ready to merge it. Thanks for your contribution.

Xzelsius commented 10 months ago

@HofmeisterAn That's actually a way better solution than what I did with the test :) Looks good to me 👍