Skip to content

Commit 1e5b0a7

Browse files
fix ITests
1 parent f4358f5 commit 1e5b0a7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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
@@ -12,6 +12,7 @@ import {
1212
requirements, serverConfig
1313
} from '../deps';
1414
import { ServerService } from 'src/modules/server/server.service';
15+
import { convertArrayReplyToObject } from 'src/modules/redis/utils';
1516
const { server, request, constants, rte, analytics } = deps;
1617

1718
// endpoint to test
@@ -292,7 +293,7 @@ describe('POST /databases/:instanceId/cli/:uuid/send-command', () => {
292293
expect(await rte.client.exists(constants.TEST_HASH_KEY_1)).to.eql(0);
293294
},
294295
after: async () => {
295-
expect(await rte.client.hgetall(constants.TEST_HASH_KEY_1)).to.deep.eql({
296+
expect(convertArrayReplyToObject(await rte.client.hgetall(constants.TEST_HASH_KEY_1))).to.deep.eql({
296297
[constants.TEST_HASH_FIELD_1_NAME]: constants.TEST_HASH_FIELD_1_VALUE,
297298
});
298299
},

redisinsight/api/test/api/workbench/POST-databases-id-workbench-command_executions.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,
1313
} from '../deps';
14+
import { convertArrayReplyToObject } from 'src/modules/redis/utils';
1415
const { server, request, constants, rte, localDb } = deps;
1516

1617
// endpoint to test
@@ -369,7 +370,7 @@ describe('POST /databases/:instanceId/workbench/command-executions', () => {
369370
expect(await rte.client.exists(constants.TEST_HASH_KEY_1)).to.eql(0);
370371
},
371372
after: async () => {
372-
expect(await rte.client.hgetall(constants.TEST_HASH_KEY_1)).to.deep.eql({
373+
expect(convertArrayReplyToObject(await rte.client.hgetall(constants.TEST_HASH_KEY_1))).to.deep.eql({
373374
[constants.TEST_HASH_FIELD_1_NAME]: constants.TEST_HASH_FIELD_1_VALUE,
374375
});
375376
},

0 commit comments

Comments
 (0)