mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(core): Ensure sentry releases follow semver (no-changelog) (#13907)
This commit is contained in:
committed by
GitHub
parent
eec325127c
commit
86b791167a
@@ -5,6 +5,12 @@ import type { ErrorReporter } from 'n8n-core';
|
||||
import { TaskRunnerSentry } from '../task-runner-sentry';
|
||||
|
||||
describe('TaskRunnerSentry', () => {
|
||||
const commonConfig = {
|
||||
n8nVersion: '1.0.0',
|
||||
environment: 'local',
|
||||
deploymentName: 'test',
|
||||
};
|
||||
|
||||
afterEach(() => {
|
||||
jest.resetAllMocks();
|
||||
});
|
||||
@@ -12,10 +18,8 @@ describe('TaskRunnerSentry', () => {
|
||||
describe('filterOutUserCodeErrors', () => {
|
||||
const sentry = new TaskRunnerSentry(
|
||||
{
|
||||
...commonConfig,
|
||||
dsn: 'https://sentry.io/123',
|
||||
n8nVersion: '1.0.0',
|
||||
environment: 'local',
|
||||
deploymentName: 'test',
|
||||
},
|
||||
mock(),
|
||||
);
|
||||
@@ -103,10 +107,8 @@ describe('TaskRunnerSentry', () => {
|
||||
it('should not configure sentry if dsn is not set', async () => {
|
||||
const sentry = new TaskRunnerSentry(
|
||||
{
|
||||
...commonConfig,
|
||||
dsn: '',
|
||||
n8nVersion: '1.0.0',
|
||||
environment: 'local',
|
||||
deploymentName: 'test',
|
||||
},
|
||||
mockErrorReporter,
|
||||
);
|
||||
@@ -119,10 +121,8 @@ describe('TaskRunnerSentry', () => {
|
||||
it('should configure sentry if dsn is set', async () => {
|
||||
const sentry = new TaskRunnerSentry(
|
||||
{
|
||||
...commonConfig,
|
||||
dsn: 'https://sentry.io/123',
|
||||
n8nVersion: '1.0.0',
|
||||
environment: 'local',
|
||||
deploymentName: 'test',
|
||||
},
|
||||
mockErrorReporter,
|
||||
);
|
||||
@@ -132,7 +132,7 @@ describe('TaskRunnerSentry', () => {
|
||||
expect(mockErrorReporter.init).toHaveBeenCalledWith({
|
||||
dsn: 'https://sentry.io/123',
|
||||
beforeSendFilter: sentry.filterOutUserCodeErrors,
|
||||
release: '1.0.0',
|
||||
release: 'n8n@1.0.0',
|
||||
environment: 'local',
|
||||
serverName: 'test',
|
||||
serverType: 'task_runner',
|
||||
@@ -146,10 +146,8 @@ describe('TaskRunnerSentry', () => {
|
||||
it('should not shutdown sentry if dsn is not set', async () => {
|
||||
const sentry = new TaskRunnerSentry(
|
||||
{
|
||||
...commonConfig,
|
||||
dsn: '',
|
||||
n8nVersion: '1.0.0',
|
||||
environment: 'local',
|
||||
deploymentName: 'test',
|
||||
},
|
||||
mockErrorReporter,
|
||||
);
|
||||
@@ -162,10 +160,8 @@ describe('TaskRunnerSentry', () => {
|
||||
it('should shutdown sentry if dsn is set', async () => {
|
||||
const sentry = new TaskRunnerSentry(
|
||||
{
|
||||
...commonConfig,
|
||||
dsn: 'https://sentry.io/123',
|
||||
n8nVersion: '1.0.0',
|
||||
environment: 'local',
|
||||
deploymentName: 'test',
|
||||
},
|
||||
mockErrorReporter,
|
||||
);
|
||||
|
||||
@@ -22,7 +22,7 @@ export class TaskRunnerSentry {
|
||||
await this.errorReporter.init({
|
||||
serverType: 'task_runner',
|
||||
dsn,
|
||||
release: n8nVersion,
|
||||
release: `n8n@${n8nVersion}`,
|
||||
environment,
|
||||
serverName: deploymentName,
|
||||
beforeSendFilter: this.filterOutUserCodeErrors,
|
||||
|
||||
Reference in New Issue
Block a user