Skip to content

Commit 69ee489

Browse files
committed
* #RI-1697 - fix tests
1 parent 60f2a45 commit 69ee489

File tree

3 files changed

+53
-1
lines changed

3 files changed

+53
-1
lines changed

redisinsight/api/src/modules/cli/services/cli-business/cli-business.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ describe('CliBusinessService', () => {
197197
});
198198

199199
describe('sendCommand', () => {
200-
it('should successfully execute command and return text response', async () => {
200+
it('should successfully execute command (RAW format)', async () => {
201201
const dto: SendCommandDto = { command: mockMemoryUsageCommand };
202202
const formatSpy = jest.spyOn(rawFormatter, 'format');
203203
const mockResult: SendCommandResponse = {

redisinsight/api/test/api/cli/POST-instance-id-cli-uuid-send_cluster_command.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ describe('POST /instance/:instanceId/cli/:uuid/send-cluster-command', () => {
8585
name: 'Should create string',
8686
data: {
8787
command: `set ${constants.TEST_STRING_KEY_1} ${constants.TEST_STRING_VALUE_1}`,
88+
outputFormat: 'TEXT',
8889
role: 'ALL',
8990
},
9091
responseSchema,
@@ -99,6 +100,7 @@ describe('POST /instance/:instanceId/cli/:uuid/send-cluster-command', () => {
99100
name: 'Should get string',
100101
data: {
101102
command: `get ${constants.TEST_STRING_KEY_1}`,
103+
outputFormat: 'TEXT',
102104
role: 'ALL',
103105
},
104106
responseSchema,
@@ -111,6 +113,7 @@ describe('POST /instance/:instanceId/cli/:uuid/send-cluster-command', () => {
111113
name: 'Should remove string',
112114
data: {
113115
command: `del ${constants.TEST_STRING_KEY_1}`,
116+
outputFormat: 'TEXT',
114117
role: 'ALL',
115118
},
116119
responseSchema,
@@ -134,6 +137,7 @@ describe('POST /instance/:instanceId/cli/:uuid/send-cluster-command', () => {
134137
name: 'Should create string',
135138
data: {
136139
command: `set ${constants.TEST_STRING_KEY_1} ${constants.TEST_STRING_VALUE_1}`,
140+
outputFormat: 'TEXT',
137141
role: 'ALL',
138142
nodeOptions
139143
},
@@ -152,6 +156,7 @@ describe('POST /instance/:instanceId/cli/:uuid/send-cluster-command', () => {
152156
name: 'Should get string',
153157
data: {
154158
command: `get ${constants.TEST_STRING_KEY_1}`,
159+
outputFormat: 'TEXT',
155160
role: 'ALL',
156161
nodeOptions
157162
},
@@ -165,6 +170,7 @@ describe('POST /instance/:instanceId/cli/:uuid/send-cluster-command', () => {
165170
name: 'Should remove string',
166171
data: {
167172
command: `del ${constants.TEST_STRING_KEY_1}`,
173+
outputFormat: 'TEXT',
168174
role: 'ALL',
169175
nodeOptions
170176
},
@@ -259,6 +265,7 @@ describe('POST /instance/:instanceId/cli/:uuid/send-cluster-command', () => {
259265
name: `Should create string with redirection if needed (${node.host}:${node.port})`,
260266
data: {
261267
command: `set ${constants.TEST_STRING_KEY_1} ${node.host}`,
268+
outputFormat: 'TEXT',
262269
role: 'ALL',
263270
nodeOptions: {
264271
host: node.host,

0 commit comments

Comments
 (0)