Closed QBT-VinayAdiga closed 4 months ago
Hm, can you elaborate on that? I do not think this is the responsibility of Testcontainers, rather than the responsibility of your test framework and test design. The test frameworks offer several mechanisms to either share fixtures among tests or not. If you need a fresh instance for each test, simply recreate one. Here is the explanation of xUnit.net's Shared Context; similar concepts exist in other test frameworks.
As mentioned, I do not believe this is the responsibility of Testcontainers. I will go ahead and close this issue. However, if you could provide additional information about your use case and explain why you believe this enhancement is necessary for Testcontainers, please do not hesitate to reopen it and share your thoughts. IMO, configuring and setting this up through the test frameworks is straightforward.
Problem
I need each test to run independently and with clean database. But the testcontainer-postgresql holds the data across tests.
Solution
Probably an attribute to clean up data before running test.
Benefit
Can test with clean data across tests.
Alternatives
Not that I know of
Would you like to help contributing this enhancement?
Yes