Skip to content

Commit c54616d

Browse files
author
Artem
committed
#RI-4454 fix ITests
1 parent f189736 commit c54616d

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

redisinsight/api/src/modules/server/server.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class ServerService implements OnApplicationBootstrap {
5151
this.eventEmitter.emit(AppAnalyticsEvents.Initialize, {
5252
anonymousId: server.id,
5353
sessionId: this.sessionId,
54-
appType: this.getAppType(SERVER_CONFIG.buildType),
54+
appType: ServerService.getAppType(SERVER_CONFIG.buildType),
5555
...(await this.featuresConfigService.getControlInfo()),
5656
});
5757

@@ -86,7 +86,7 @@ export class ServerService implements OnApplicationBootstrap {
8686
appVersion: SERVER_CONFIG.appVersion,
8787
osPlatform: process.platform,
8888
buildType: SERVER_CONFIG.buildType,
89-
appType: this.getAppType(SERVER_CONFIG.buildType),
89+
appType: ServerService.getAppType(SERVER_CONFIG.buildType),
9090
encryptionStrategies: await this.encryptionService.getAvailableEncryptionStrategies(),
9191
fixedDatabaseId: REDIS_STACK_CONFIG?.id,
9292
...(await this.featuresConfigService.getControlInfo()),
@@ -99,7 +99,7 @@ export class ServerService implements OnApplicationBootstrap {
9999
}
100100
}
101101

102-
getAppType(buildType: string): AppType {
102+
static getAppType(buildType: string): AppType {
103103
switch (buildType) {
104104
case BuildType.DockerOnPremise:
105105
return AppType.Docker;

redisinsight/api/test/api/analytics/analytics.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ describe('Analytics', () => {
1313
requirements('rte.serverType=local');
1414

1515
it('APPLICATION_STARTED', () => {
16-
if(serverConfig.get('server').buildType !== 'ELECTRON') {
17-
return
18-
}
19-
16+
// if(serverConfig.get('server').buildType !== 'ELECTRON') {
17+
// return
18+
// }
2019
const appStarted = analytics.findEvent({
2120
event: 'APPLICATION_STARTED',
2221
})

redisinsight/api/test/api/cli/POST-databases-id-cli-uuid-send_command.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
validateApiCall,
1212
requirements, serverConfig
1313
} from '../deps';
14+
import { ServerService } from 'src/modules/server/server.service';
1415
const { server, request, constants, rte, analytics } = deps;
1516

1617
// endpoint to test
@@ -98,7 +99,7 @@ describe('POST /databases/:instanceId/cli/:uuid/send-command', () => {
9899
capability: 'string',
99100
command: 'SET',
100101
outputFormat: 'TEXT',
101-
buildType: serverConfig.get('server').buildType,
102+
buildType: ServerService.getAppType(serverConfig.get('server').buildType),
102103
},
103104
});
104105
}

redisinsight/api/test/api/database/POST-databases.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
generateInvalidDataTestCases, validateInvalidDataTestCase, getMainCheckFn, serverConfig,
1111
} from '../deps';
1212
import { databaseSchema } from './constants';
13+
import { ServerService } from 'src/modules/server/server.service';
1314
const { rte, request, server, localDb, constants, analytics } = deps;
1415

1516
const endpoint = () => request(server).post(`/${constants.API.DATABASES}`);
@@ -167,7 +168,7 @@ describe('POST /databases', () => {
167168
// RedisJSON: { loaded: false },
168169
// RedisTimeSeries: { loaded: false },
169170
// customModules: [],
170-
buildType: serverConfig.get('server').buildType,
171+
buildType: ServerService.getAppType(serverConfig.get('server').buildType),
171172
},
172173
});
173174
},

0 commit comments

Comments
 (0)