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

@@ -12,6 +12,8 @@ import { createWorkflow } from './shared/testDb';
import type { SaveCredentialFunction } from './shared/types';
import { makeWorkflow } from './shared/utils';
import { randomCredentialPayload } from './shared/random';
import Container from 'typedi';
import { License } from '../../src/License';
let owner: User;
let member: User;
@@ -23,6 +25,7 @@ let saveCredential: SaveCredentialFunction;
let sharingSpy: jest.SpyInstance<boolean>;
beforeAll(async () => {
Container.get(License).isSharingEnabled = () => true;
const app = await utils.initTestServer({ endpointGroups: ['workflows'] });
const globalOwnerRole = await testDb.getGlobalOwnerRole();
@@ -42,8 +45,6 @@ beforeAll(async () => {
sharingSpy = jest.spyOn(UserManagementHelpers, 'isSharingEnabled').mockReturnValue(true);
await utils.initNodeTypes();
config.set('enterprise.features.sharing', true);
});
beforeEach(async () => {
@@ -51,6 +52,7 @@ beforeEach(async () => {
});
afterAll(async () => {
Container.reset();
await testDb.terminate();
});