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

Function TestPostgresImpersonation

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

Source from the content-addressed store, hash-verified

127}
128
129func TestPostgresImpersonation(t *testing.T) {
130 if testing.Short() {
131 t.Skip("skipping Postgres integration tests")
132 }
133 requirePostgresVars(t)
134 // Prepare the initial arguments
135 args := []string{
136 "--impersonate-service-account", *impersonatedUser,
137 *postgresConnName,
138 }
139 // Add the IP type flag using the helper
140 args = AddIPTypeFlag(args)
141 // Run the test
142 proxyConnTest(t, args, "pgx", postgresDSN())
143}
144
145func TestPostgresAuthentication(t *testing.T) {
146 if testing.Short() {

Callers

nothing calls this directly

Calls 4

requirePostgresVarsFunction · 0.85
AddIPTypeFlagFunction · 0.85
proxyConnTestFunction · 0.85
postgresDSNFunction · 0.85

Tested by

no test coverage detected