Revert "feat(core): Read ephemeral license from environment and cleanup ee flags (#5797)" (#5816)

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

This reverts commit a81ca7c19c.
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-03-29 18:00:29 +02:00
committed by GitHub
parent 06d7a46bdc
commit be373bb859
19 changed files with 86 additions and 71 deletions

View File

@@ -23,8 +23,6 @@ import { MessageEventBusDestinationWebhook } from '@/eventbus/MessageEventBusDes
import { MessageEventBusDestinationSentry } from '@/eventbus/MessageEventBusDestination/MessageEventBusDestinationSentry.ee';
import { EventMessageAudit } from '@/eventbus/EventMessageClasses/EventMessageAudit';
import { EventNamesTypes } from '@/eventbus/EventMessageClasses';
import Container from 'typedi';
import { License } from '../../src/License';
jest.unmock('@/eventbus/MessageEventBus/MessageEventBus');
jest.mock('axios');
@@ -79,7 +77,6 @@ async function confirmIdSent(id: string) {
}
beforeAll(async () => {
Container.get(License).isLogStreamingEnabled = () => true;
app = await utils.initTestServer({ endpointGroups: ['eventBus'] });
globalOwnerRole = await testDb.getGlobalOwnerRole();
@@ -104,6 +101,7 @@ beforeAll(async () => {
utils.initConfigFile();
config.set('eventBus.logWriter.logBaseName', 'n8n-test-logwriter');
config.set('eventBus.logWriter.keepLogCount', 1);
config.set('enterprise.features.logStreaming', true);
config.set('userManagement.disabled', false);
config.set('userManagement.isInstanceOwnerSetUp', true);
@@ -112,7 +110,6 @@ beforeAll(async () => {
afterAll(async () => {
jest.mock('@/eventbus/MessageEventBus/MessageEventBus');
Container.reset();
await testDb.terminate();
await eventBus.close();
});
@@ -181,6 +178,7 @@ test.skip('should send message to syslog', async () => {
eventName: 'n8n.test.message' as EventNamesTypes,
id: uuid(),
});
config.set('enterprise.features.logStreaming', true);
const syslogDestination = eventBus.destinations[
testSyslogDestination.id!
@@ -221,6 +219,7 @@ test.skip('should confirm send message if there are no subscribers', async () =>
eventName: 'n8n.test.unsub' as EventNamesTypes,
id: uuid(),
});
config.set('enterprise.features.logStreaming', true);
const syslogDestination = eventBus.destinations[
testSyslogDestination.id!
@@ -256,6 +255,7 @@ test('should anonymize audit message to syslog ', async () => {
},
id: uuid(),
});
config.set('enterprise.features.logStreaming', true);
const syslogDestination = eventBus.destinations[
testSyslogDestination.id!
@@ -317,6 +317,7 @@ test('should send message to webhook ', async () => {
eventName: 'n8n.test.message' as EventNamesTypes,
id: uuid(),
});
config.set('enterprise.features.logStreaming', true);
const webhookDestination = eventBus.destinations[
testWebhookDestination.id!
@@ -351,6 +352,7 @@ test('should send message to sentry ', async () => {
eventName: 'n8n.test.message' as EventNamesTypes,
id: uuid(),
});
config.set('enterprise.features.logStreaming', true);
const sentryDestination = eventBus.destinations[
testSentryDestination.id!