Skip to content
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 host.docker.internal for acceptance testing on macs #12791

Merged
merged 3 commits into from
May 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ public class AcceptanceTests {
private static final boolean IS_KUBE = System.getenv().containsKey("KUBE");
private static final boolean IS_MINIKUBE = System.getenv().containsKey("IS_MINIKUBE");
private static final boolean IS_GKE = System.getenv().containsKey("IS_GKE");
private static final boolean IS_MAC = System.getProperty("os.name").startsWith("Mac");
private static final boolean USE_EXTERNAL_DEPLOYMENT =
System.getenv("USE_EXTERNAL_DEPLOYMENT") != null && System.getenv("USE_EXTERNAL_DEPLOYMENT").equalsIgnoreCase("true");

Expand Down Expand Up @@ -1548,6 +1549,8 @@ private Map<Object, Object> localConfig(final PostgreSQLContainer psql, final bo
// used on a single node with docker driver
dbConfig.put("host", "host.docker.internal");
}
} else if (IS_MAC) {
dbConfig.put("host", "host.docker.internal");
} else {
dbConfig.put("host", "localhost");
}
Expand Down