()
| 3 | import { oauthScope, SnowflakeCortexAuthPlugin } from "../../src/plugin/snowflake-cortex" |
| 4 | |
| 5 | function makeInput() { |
| 6 | let auth: any = { |
| 7 | type: "oauth", |
| 8 | access: "access-old", |
| 9 | refresh: "refresh-old", |
| 10 | expires: Date.now() + 3600_000, |
| 11 | accountId: "myorg-myaccount", |
| 12 | } |
| 13 | const setCalls: Array<Record<string, unknown>> = [] |
| 14 | |
| 15 | return { |
| 16 | getAuth: async () => auth, |
| 17 | setAuth: (next: any) => { |
| 18 | auth = next |
| 19 | }, |
| 20 | input: { |
| 21 | client: { |
| 22 | auth: { |
| 23 | set: async (request: any) => { |
| 24 | setCalls.push(request) |
| 25 | auth = request.body |
| 26 | }, |
| 27 | }, |
| 28 | }, |
| 29 | } as any, |
| 30 | setCalls, |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | describe("plugin.snowflake-cortex", () => { |
| 35 | test("oauthScope uses Snowflake-compatible scope values", () => { |
no test coverage detected