Standard manner to read properties and env vars for Testcontainers settings #531
mdelapenya
started this conversation in
Ideas
Replies: 1 comment
-
SkipReaper has been deprecated, so I think this discussion is not valid anymore. On the other hand, having a consistent manner for loading env vars and props would be convenient. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Comment from @sneko #399 (comment):
I just realised that I can set
SkipReaper: true
in thetestcontainers.ContainerRequest
struct so Ryuk is disabled. But that's hardcoded in the code, there is no way to manage it through an environment variable.I looked a bit more at the code and doing a PR for this is a bit annoying because which would prevail if both are set? Considering
TESTCONTAINERS_RYUK_DISABLED
for all containers whereasSkipReaper
is per request. But since by defaultSkipReaper
is not a pointer it's always considered asfalse
. So to not make breaking change the only solution would be to say, whatever theSkipReaper
specified,TESTCONTAINERS_RYUK_DISABLED
will override.In the meantime since my CI/CD had an environment variable
CI=true
, I setSkipReaper
according to it.Ideas
Standardize how the testcontainers.properties file, and the ENV VARS are initialised, defining and documenting the right order of precedence.
Beta Was this translation helpful? Give feedback.
All reactions