Skip to content

Commit 6cc96f7

Browse files
author
Artem
committed
#RI-4489 fix ITests
1 parent 7bc7895 commit 6cc96f7

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

redisinsight/api/config/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export default {
22
server: {
33
env: 'test',
4-
requestTimeout: 1000,
4+
requestTimeout: parseInt(process.env.REQUEST_TIMEOUT, 10) || 1000,
55
},
66
db: {
77
synchronize: process.env.DB_SYNC ? process.env.DB_SYNC === 'true' : true,
@@ -11,11 +11,11 @@ export default {
1111
logFileIdleThreshold: parseInt(process.env.PROFILER_LOG_FILE_IDLE_THRESHOLD, 10) || 1000 * 2, // 3sec
1212
},
1313
notifications: {
14-
updateUrl: 'https://s3.amazonaws.com/redisinsight.test/public/tests/notifications.json',
14+
updateUrl: process.env.NOTIFICATION_UPDATE_URL
15+
|| 'https://s3.amazonaws.com/redisinsight.test/public/tests/notifications.json',
1516
},
1617
features_config: {
1718
url: process.env.RI_FEATURES_CONFIG_URL
18-
// eslint-disable-next-line max-len
1919
|| 'http://localhost:5551/remote/features-config.json',
2020
},
2121
};
File renamed without changes.

redisinsight/api/test/api/feature/GET-features.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
expect,
33
describe,
44
deps,
5-
getMainCheckFn, fsExtra, before
5+
getMainCheckFn, fsExtra, before, after,
66
} from '../deps';
77
import { constants } from '../../helpers/constants';
88
import * as defaultConfig from '../../../config/features-config.json';
@@ -34,6 +34,8 @@ const waitForFlags = async (flags: any) => {
3434
let featureConfigRepository;
3535
let featureRepository;
3636
describe('GET /features', () => {
37+
after(initSettings);
38+
3739
before(async () => {
3840
await initSettings();
3941
featureConfigRepository = await getRepository(repositories.FEATURES_CONFIG);

redisinsight/api/test/test-runs/local.build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ services:
2020
environment:
2121
CERTS_FOLDER: "/root/.redisinsight-v2.0"
2222
TEST_REDIS_HOST: "redis"
23-
NOTIFICATION_UPDATE_URL: "https://s3.amazonaws.com/redisinsight.test/public/tests/notifications.json"
23+
NODE_ENV: "test"
24+
REQUEST_TIMEOUT: "25000"
2425

2526
# dummy service to prevent docker validation errors
2627
app:

0 commit comments

Comments
 (0)