({ config, credentials, signal })
| 441 | credentialsSchema: snowflakeCredentialsSchema, |
| 442 | |
| 443 | async test({ config, credentials, signal }) { |
| 444 | let cached: JwtCacheEntry | null = null |
| 445 | async function getJwt(): Promise<string> { |
| 446 | const now = Math.floor(Date.now() / 1000) |
| 447 | if (cached && cached.expiresAt > now) return cached.token |
| 448 | cached = await buildJwt(config.account, config.user, credentials.privateKey) |
| 449 | return cached.token |
| 450 | } |
| 451 | await executeStatement({ |
| 452 | config, |
| 453 | getJwt, |
| 454 | statement: 'SELECT 1', |
| 455 | bindings: [], |
| 456 | signal, |
| 457 | }) |
| 458 | }, |
| 459 | |
| 460 | openSession({ config, credentials }) { |
| 461 | let cached: JwtCacheEntry | null = null |
nothing calls this directly
no test coverage detected