MCPcopy Index your code
hub / github.com/GoogleCloudPlatform/cloud-sql-proxy / requirePostgresVars

Function requirePostgresVars

tests/postgres_test.go:42–53  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

40)
41
42func requirePostgresVars(t *testing.T) {
43 switch "" {
44 case *postgresConnName:
45 t.Fatal("'postgres_conn_name' not set")
46 case *postgresUser:
47 t.Fatal("'postgres_user' not set")
48 case *postgresPass:
49 t.Fatal("'postgres_pass' not set")
50 case *postgresDB:
51 t.Fatal("'postgres_db' not set")
52 }
53}
54
55func postgresDSN() string {
56 return fmt.Sprintf("host=localhost user=%s password=%s database=%s sslmode=disable",

Callers 8

TestPostgresTCPFunction · 0.85
TestPostgresUnixFunction · 0.85
TestPostgresMCPUnixFunction · 0.85
TestPostgresGcloudAuthFunction · 0.85
TestPostgresIAMDBAuthnFunction · 0.85
TestPostgresCustomerCASFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected