mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
⚡ Change credentials structure (#2139)
* ✨ change FE to handle new object type * 🚸 improve UX of handling invalid credentials * 🚧 WIP * 🎨 fix typescript issues * 🐘 add migrations for all supported dbs * ✏️ add description to migrations * ⚡ add credential update on import * ⚡ resolve after merge issues * 👕 fix lint issues * ⚡ check credentials on workflow create/update * update interface * 👕 fix ts issues * ⚡ adaption to new credentials UI * 🐛 intialize cache on BE for credentials check * 🐛 fix undefined oldCredentials * 🐛 fix deleting credential * 🐛 fix check for undefined keys * 🐛 fix disabling edit in execution * 🎨 just show credential name on execution view * ✏️ remove TODO * ⚡ implement review suggestions * ⚡ add cache to getCredentialsByType * ⏪ use getter instead of cache * ✏️ fix variable name typo * 🐘 include waiting nodes to migrations * 🐛 fix reverting migrations command * ⚡ update typeorm command * ✨ create db:revert command * 👕 fix lint error Co-authored-by: Mutasem <mutdmour@gmail.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import { Credentials } from '../src';
|
||||
describe('Credentials', () => {
|
||||
describe('without nodeType set', () => {
|
||||
test('should be able to set and read key data without initial data set', () => {
|
||||
const credentials = new Credentials('testName', 'testType', []);
|
||||
const credentials = new Credentials({ id: null, name: 'testName' }, 'testType', []);
|
||||
|
||||
const key = 'key1';
|
||||
const password = 'password';
|
||||
@@ -23,7 +23,12 @@ describe('Credentials', () => {
|
||||
const initialData = 4321;
|
||||
const initialDataEncoded = 'U2FsdGVkX1+0baznXt+Ag/ub8A2kHLyoLxn/rR9h4XQ=';
|
||||
|
||||
const credentials = new Credentials('testName', 'testType', [], initialDataEncoded);
|
||||
const credentials = new Credentials(
|
||||
{ id: null, name: 'testName' },
|
||||
'testType',
|
||||
[],
|
||||
initialDataEncoded,
|
||||
);
|
||||
|
||||
const newData = 1234;
|
||||
|
||||
@@ -46,7 +51,7 @@ describe('Credentials', () => {
|
||||
},
|
||||
];
|
||||
|
||||
const credentials = new Credentials('testName', 'testType', nodeAccess);
|
||||
const credentials = new Credentials({ id: null, name: 'testName' }, 'testType', nodeAccess);
|
||||
|
||||
const key = 'key1';
|
||||
const password = 'password';
|
||||
|
||||
Reference in New Issue
Block a user