MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/cloud-sql-proxy / keyfile

Function keyfile

tests/connection_test.go:61–71  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

59}
60
61func keyfile(t *testing.T) string {
62 path := os.Getenv("GOOGLE_APPLICATION_CREDENTIALS")
63 if path == "" {
64 t.Skip("GOOGLE_APPLICATION_CREDENTIALS not set")
65 }
66 creds, err := os.ReadFile(path)
67 if err != nil {
68 t.Fatalf("io.ReadAll(): %v", err)
69 }
70 return string(creds)
71}
72func proxyConnTestWithReady(t *testing.T, args []string, driver, dsn string, ready func() error) {
73 ctx, cancel := context.WithTimeout(context.Background(), connTestTimeout)
74 defer cancel()

Callers 3

TestMySQLAuthenticationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected