mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(Snowflake Node): Add support for Key-Pair authentication (#14833)
This commit is contained in:
committed by
GitHub
parent
c02696241b
commit
4302c5f474
@@ -0,0 +1,43 @@
|
||||
import { getConnectionOptions } from '../GenericFunctions';
|
||||
|
||||
describe('getConnectionOptions', () => {
|
||||
const commonOptions = {
|
||||
account: 'test-account',
|
||||
database: 'test-database',
|
||||
schema: 'test-schema',
|
||||
warehouse: 'test-warehouse',
|
||||
role: 'test-role',
|
||||
clientSessionKeepAlive: true,
|
||||
};
|
||||
|
||||
describe('should return connection options', () => {
|
||||
it('with username and password for password authentication', () => {
|
||||
const result = getConnectionOptions({
|
||||
...commonOptions,
|
||||
authentication: 'password',
|
||||
username: 'test-username',
|
||||
password: 'test-password',
|
||||
});
|
||||
|
||||
expect(result).toEqual({
|
||||
...commonOptions,
|
||||
username: 'test-username',
|
||||
password: 'test-password',
|
||||
});
|
||||
});
|
||||
|
||||
it('with private key for keyPair authentication', () => {
|
||||
const result = getConnectionOptions({
|
||||
...commonOptions,
|
||||
authentication: 'keyPair',
|
||||
privateKey: 'test-private-key',
|
||||
});
|
||||
|
||||
expect(result).toEqual({
|
||||
...commonOptions,
|
||||
authenticator: 'SNOWFLAKE_JWT',
|
||||
privateKey: 'test-private-key',
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user