Skip to content

Commit cf75f44

Browse files
authored
Merge pull request #1643 from RedisInsight/e2e/bugfix/redis-package-fixes
update for redis package issue
2 parents 629c5b4 + 996d317 commit cf75f44

File tree

3 files changed

+1639
-1534
lines changed

3 files changed

+1639
-1534
lines changed

tests/e2e/helpers/keys.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export async function deleteKeysViaCli(keyData: KeyData): Promise<void> {
8282
* @param keyArguments The arguments of key
8383
*/
8484
export async function populateDBWithHashes(host: string, port: string, keyArguments: AddKeyArguments): Promise<void> {
85-
const dbConf = { host, port: Number(port) };
85+
const dbConf = { port: Number.parseInt(port), host, username: 'default' };
8686
const client = createClient(dbConf);
8787

8888
await client.on('error', async function (error: string) {
@@ -110,7 +110,7 @@ export async function populateDBWithHashes(host: string, port: string, keyArgume
110110
* @param keyArguments The arguments of key and its fields
111111
*/
112112
export async function populateHashWithFields(host: string, port: string, keyArguments: AddKeyArguments): Promise<void> {
113-
const dbConf = { host, port: Number(port) };
113+
const dbConf = { port: Number.parseInt(port), host, username: 'default' };
114114
const client = createClient(dbConf);
115115
const fields: string[] = [];
116116

@@ -141,7 +141,7 @@ export async function populateHashWithFields(host: string, port: string, keyArgu
141141
* @param keyArguments The arguments of key and its members
142142
*/
143143
export async function populateListWithElements(host: string, port: string, keyArguments: AddKeyArguments): Promise<void> {
144-
const dbConf = { host, port: Number(port) };
144+
const dbConf = { port: Number.parseInt(port), host, username: 'default' };
145145
const client = createClient(dbConf);
146146
const elements: string[] = [];
147147

@@ -171,7 +171,7 @@ export async function populateListWithElements(host: string, port: string, keyAr
171171
* @param keyArguments The arguments of key and its members
172172
*/
173173
export async function populateSetWithMembers(host: string, port: string, keyArguments: AddKeyArguments): Promise<void> {
174-
const dbConf = { host, port: Number(port) };
174+
const dbConf = { port: Number.parseInt(port), host, username: 'default' };
175175
const client = createClient(dbConf);
176176
const members: string[] = [];
177177

@@ -201,7 +201,7 @@ export async function populateSetWithMembers(host: string, port: string, keyArgu
201201
* @param keyArguments The arguments of key and its members
202202
*/
203203
export async function populateZSetWithMembers(host: string, port: string, keyArguments: AddKeyArguments): Promise<void> {
204-
const dbConf = { host, port: Number(port) };
204+
const dbConf = { port: Number.parseInt(port), host, username: 'default' };
205205
let minScoreValue: -10;
206206
let maxScoreValue: 10;
207207
const client = createClient(dbConf);
@@ -233,7 +233,7 @@ export async function populateSetWithMembers(host: string, port: string, keyArgu
233233
* @param port The port of database
234234
*/
235235
export async function deleteAllKeysFromDB(host: string, port: string): Promise<void> {
236-
const dbConf = { host, port: Number(port) };
236+
const dbConf = { port: Number.parseInt(port), host, username: 'default' };
237237
const client = createClient(dbConf);
238238

239239
await client.on('error', async function (error: string) {

tests/e2e/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"eslint": "7.32.0",
3939
"eslint-plugin-import": "2.24.2",
4040
"sqlite3": "5.0.10",
41-
"redis": "^3.0.2",
41+
"redis": "3.0.2",
4242
"supertest": "^4.0.2",
4343
"testcafe": "1.14.2",
4444
"testcafe-browser-provider-electron": "0.0.18",

0 commit comments

Comments
 (0)