Skip to content

Commit

Permalink
fix: add default database for gorm tests
Browse files Browse the repository at this point in the history
  • Loading branch information
olavloite committed Jul 4, 2024
1 parent 8d6df4a commit 52adb39
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ public static void compile() throws IOException, InterruptedException {

private GoString createConnString() {
if (useDomainSocket) {
return new GoString(String.format("host=/tmp port=%d", pgServer.getLocalPort()));
return new GoString(String.format("host=/tmp port=%d database=d", pgServer.getLocalPort()));
}
return new GoString(
String.format("postgres://uid:pwd@localhost:%d/?sslmode=disable", pgServer.getLocalPort()));
String.format(
"postgres://uid:pwd@localhost:%d/d?sslmode=disable", pgServer.getLocalPort()));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ private GoString createConnString() {
return new GoString(String.format("host=/tmp port=%d database=d", pgServer.getLocalPort()));
}
return new GoString(
String.format("postgres://uid:pwd@localhost:%d/d?sslmode=disable", pgServer.getLocalPort()));
String.format(
"postgres://uid:pwd@localhost:%d/d?sslmode=disable", pgServer.getLocalPort()));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ private GoString createConnString() {
return new GoString(String.format("host=/tmp port=%d database=d", pgServer.getLocalPort()));
}
return new GoString(
String.format("postgres://uid:pwd@localhost:%d/d?sslmode=disable", pgServer.getLocalPort()));
String.format(
"postgres://uid:pwd@localhost:%d/d?sslmode=disable", pgServer.getLocalPort()));
}

@Test
Expand Down

0 comments on commit 52adb39

Please sign in to comment.