From 810469ab58ea547003fb9874156c047fd262846f Mon Sep 17 00:00:00 2001 From: George Raduta Date: Mon, 25 Nov 2024 16:12:30 +0100 Subject: [PATCH] [release/qcg/3.9.1] Fix issue with importing test setup file in non-test environment (#2674) * updates the import of the test setup to be done only if application is running in test environment * patch version bump for release --- QualityControl/index.js | 2 +- QualityControl/package-lock.json | 4 ++-- QualityControl/package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/QualityControl/index.js b/QualityControl/index.js index 5b2b0f0b0..1118c0222 100644 --- a/QualityControl/index.js +++ b/QualityControl/index.js @@ -16,7 +16,6 @@ import { LogManager, HttpServer, WebSocket } from '@aliceo2/web-ui'; const logger = LogManager.getLogger(`${process.env.npm_config_log_label ?? 'qcg'}/index`); import path from 'path'; import { setup } from './lib/api.js'; -import { initializeNockForCcdb } from './test/setup/testSetupForCcdb.js'; // Reading config file import { config } from './lib/config/configProvider.js'; @@ -55,6 +54,7 @@ const ws = new WebSocket(http); if (process.env.NODE_ENV === 'test') { // Initialize nock for CCDB if we are in test environment + const { initializeNockForCcdb } = await import('./test/setup/testSetupForCcdb.js'); initializeNockForCcdb(); } setup(http, ws); diff --git a/QualityControl/package-lock.json b/QualityControl/package-lock.json index 8efb988c6..2b2c3c780 100644 --- a/QualityControl/package-lock.json +++ b/QualityControl/package-lock.json @@ -1,12 +1,12 @@ { "name": "@aliceo2/qc", - "version": "3.9.0", + "version": "3.9.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@aliceo2/qc", - "version": "3.9.0", + "version": "3.9.1", "bundleDependencies": [ "@aliceo2/web-ui", "jsroot", diff --git a/QualityControl/package.json b/QualityControl/package.json index 205998a52..1e1ba4aa3 100644 --- a/QualityControl/package.json +++ b/QualityControl/package.json @@ -1,6 +1,6 @@ { "name": "@aliceo2/qc", - "version": "3.9.0", + "version": "3.9.1", "description": "O2 Quality Control Web User Interface", "author": "George Raduta", "contributors": [