singleton container postgresql #924
Answered
by
HofmeisterAn
diogo-soares
asked this question in
Q&A
-
Is it possible to create a postgres container for example and run all my table creation scripts run all my tests with just one container instead of creating multiple database instances unnecessarily ? |
Beta Was this translation helpful? Give feedback.
Answered by
HofmeisterAn
Jun 17, 2023
Replies: 1 comment
-
OC, why wouldn't that be possible? The singleton pattern works well with Testcontainers. We also use it in our library. For instance, both the Resource Reaper and the Port Forwarding Container are implemented as singletons. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
diogo-soares
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OC, why wouldn't that be possible? The singleton pattern works well with Testcontainers. We also use it in our library. For instance, both the Resource Reaper and the Port Forwarding Container are implemented as singletons.