(t *testing.T)
| 300 | } |
| 301 | |
| 302 | func TestPostgresCustomerCAS(t *testing.T) { |
| 303 | if testing.Short() { |
| 304 | t.Skip("skipping Postgres integration tests") |
| 305 | } |
| 306 | requirePostgresVars(t) |
| 307 | if *postgresCustomerCASConnName == "" { |
| 308 | t.Fatal("'postgres_customer_cas_conn_name' not set") |
| 309 | } |
| 310 | if *postgresCustomerCASPass == "" { |
| 311 | t.Fatal("'postgres_customer_cas_pass' not set") |
| 312 | } |
| 313 | if *postgresCustomerCASDomain == "" { |
| 314 | t.Fatal("'postgres_customer_cas_domain' not set") |
| 315 | } |
| 316 | |
| 317 | defaultDSN := fmt.Sprintf("host=localhost user=%s password=%s database=%s sslmode=disable", |
| 318 | *postgresUser, *postgresCustomerCASPass, *postgresDB) |
| 319 | |
| 320 | tcs := []struct { |
| 321 | desc string |
| 322 | dsn string |
| 323 | args []string |
| 324 | }{ |
| 325 | { |
| 326 | desc: "using customer CAS default", |
| 327 | args: []string{*postgresCustomerCASConnName}, |
| 328 | dsn: defaultDSN, |
| 329 | }, |
| 330 | { |
| 331 | desc: "using valid domain name", |
| 332 | args: []string{*postgresCustomerCASDomain}, |
| 333 | dsn: defaultDSN, |
| 334 | }, |
| 335 | } |
| 336 | for _, tc := range tcs { |
| 337 | t.Run(tc.desc, func(t *testing.T) { |
| 338 | proxyConnTest(t, AddIPTypeFlag(tc.args), "pgx", tc.dsn) |
| 339 | }) |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | func TestPostgresHealthCheck(t *testing.T) { |
| 344 | if testing.Short() { |
nothing calls this directly
no test coverage detected