feat(core): Read ephemeral license from environment and clean up ee flags (#5797)

* remove enterprise feature schema for license.cert

* bump license sdk version

* Update packages/cli/package.json

Co-authored-by: Cornelius Suermann <cornelius@n8n.io>

---------

Co-authored-by: Cornelius Suermann <cornelius@n8n.io>
This commit is contained in:
Michael Auerswald
2023-03-28 17:21:40 +02:00
committed by GitHub
parent 5f6183a031
commit a81ca7c19c
18 changed files with 59 additions and 69 deletions

View File

@@ -17,6 +17,8 @@ import * as testDb from './../shared/testDb';
import type { AuthAgent } from '../shared/types';
import * as utils from '../shared/utils';
import { getCurrentAuthenticationMethod, setCurrentAuthenticationMethod } from '@/sso/ssoHelpers';
import Container from 'typedi';
import { License } from '../../../src/License';
jest.mock('@/telemetry');
jest.mock('@/UserManagement/email/NodeMailer');
@@ -41,6 +43,7 @@ const defaultLdapConfig = {
};
beforeAll(async () => {
Container.get(License).isLdapEnabled = () => true;
app = await utils.initTestServer({ endpointGroups: ['auth', 'ldap'] });
const [globalOwnerRole, fetchedGlobalMemberRole] = await testDb.getAllRoles();
@@ -77,10 +80,10 @@ beforeEach(async () => {
config.set('userManagement.disabled', false);
config.set('userManagement.isInstanceOwnerSetUp', true);
config.set('userManagement.emails.mode', '');
config.set('enterprise.features.ldap', true);
});
afterAll(async () => {
Container.reset();
await testDb.terminate();
});