(t *testing.T)
| 71 | } |
| 72 | |
| 73 | func TestPostgresUnix(t *testing.T) { |
| 74 | if testing.Short() { |
| 75 | t.Skip("skipping Postgres integration tests") |
| 76 | } |
| 77 | requirePostgresVars(t) |
| 78 | tmpDir, cleanup := createTempDir(t) |
| 79 | defer cleanup() |
| 80 | |
| 81 | dsn := fmt.Sprintf("host=%s user=%s password=%s database=%s sslmode=disable", |
| 82 | // re-use utility function to determine the Unix address in a |
| 83 | // Windows-friendly way. |
| 84 | proxy.UnixAddress(tmpDir, *postgresConnName), |
| 85 | *postgresUser, *postgresPass, *postgresDB) |
| 86 | |
| 87 | // Prepare the initial arguments |
| 88 | args := []string{"--unix-socket", tmpDir, *postgresConnName} |
| 89 | // Add the IP type flag using the helper |
| 90 | args = AddIPTypeFlag(args) |
| 91 | // Run the test |
| 92 | proxyConnTest(t, args, "pgx", dsn) |
| 93 | } |
| 94 | |
| 95 | func TestPostgresMCPUnix(t *testing.T) { |
| 96 | if testing.Short() { |
nothing calls this directly
no test coverage detected