MCPcopy Index your code
hub / github.com/simstudioai/sim / test

Function test

apps/sim/lib/data-drains/destinations/snowflake.ts:443–458  ·  view source on GitHub ↗
({ config, credentials, signal })

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

executeStatementFunction · 0.70

Tested by

no test coverage detected