Review fixes

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-05-07 11:52:00 +04:00
parent 9e21f8fb08
commit 72fa79629f
12 changed files with 71 additions and 12 deletions

View File

@@ -16,6 +16,7 @@ package coredata_test
import (
"context"
"net"
"net/url"
"os"
"testing"
@@ -52,7 +53,11 @@ func newTestPgClient(t *testing.T) *pg.Client {
// run in parallel.
opts := []pg.Option{pg.WithRegisterer(prometheus.NewRegistry())}
if u.Host != "" {
opts = append(opts, pg.WithAddr(u.Host))
host := u.Host
if u.Port() == "" {
host = net.JoinHostPort(u.Hostname(), "5432")
}
opts = append(opts, pg.WithAddr(host))
}
if u.User != nil {
opts = append(opts, pg.WithUser(u.User.Username()))