(t *testing.T)
| 147 | } |
| 148 | |
| 149 | func TestSQLServerGcloudAuth(t *testing.T) { |
| 150 | if testing.Short() { |
| 151 | t.Skip("skipping SQL Server integration tests") |
| 152 | } |
| 153 | if v := os.Getenv("IP_TYPE"); v == "private" || v == "psc" { |
| 154 | t.Skipf("skipping test because IP_TYPE is set to %v", v) |
| 155 | } |
| 156 | requireSQLServerVars(t) |
| 157 | |
| 158 | tcs := []struct { |
| 159 | desc string |
| 160 | args []string |
| 161 | }{ |
| 162 | { |
| 163 | desc: "gcloud user authentication", |
| 164 | args: []string{"--gcloud-auth", *sqlserverConnName}, |
| 165 | }, |
| 166 | { |
| 167 | desc: "gcloud user authentication with impersonation", |
| 168 | args: []string{ |
| 169 | "--gcloud-auth", |
| 170 | "--impersonate-service-account", *impersonatedUser, |
| 171 | *sqlserverConnName}, |
| 172 | }, |
| 173 | } |
| 174 | for _, tc := range tcs { |
| 175 | t.Run(tc.desc, func(t *testing.T) { |
| 176 | proxyConnTest(t, AddIPTypeFlag(tc.args), "sqlserver", sqlserverDSN()) |
| 177 | }) |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | func TestSQLServerHealthCheck(t *testing.T) { |
| 182 | if testing.Short() { |
nothing calls this directly
no test coverage detected