-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Use implicit strategy when docker.host
configuration is set
#4175
Conversation
} | ||
|
||
// looks for unprefixed env var or unprefixed property | ||
String unprefixedEnvVarOrProperty = getEnvVarOrUserProperty("docker.client.strategy", null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
previous implementation was prioritizing this over TESTCONTAINERS_DOCKER_CLIENT_STRATEGY
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW I am surprised why the tests are passing :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL oops...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh interesting; I'll add some more checks in the tests, but actually I think this order is better: we currently check env vars before properties anyway.
A. Currently in this PR the check order is:
TESTCONTAINERS_DOCKER_CLIENT_STRATEGY
DOCKER_CLIENT_STRATEGY
docker.client.strategy
B. Whereas previously in this PR it went:
DOCKER_CLIENT_STRATEGY
docker.client.strategy
TESTCONTAINERS_DOCKER_CLIENT_STRATEGY
C. Compared with the last release version:
TESTCONTAINERS_DOCKER_CLIENT_STRATEGY
docker.client.strategy
It would feel weird if we prioritise environment variables over properties in some cases but not this one, so I think this is more correct. A is more compatible with C than B was.
No description provided.