File tree 3 files changed +0
-22
lines changed
3 files changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -258,9 +258,6 @@ export function parseURL(url) {
258
258
const result : any = { } ;
259
259
if ( parsed . auth ) {
260
260
const parsedAuth = parsed . auth . split ( ":" ) ;
261
- if ( parsedAuth [ 0 ] ) {
262
- result . username = parsedAuth [ 0 ] ;
263
- }
264
261
result . password = parsedAuth [ 1 ] ;
265
262
}
266
263
if ( parsed . pathname ) {
Original file line number Diff line number Diff line change @@ -170,23 +170,6 @@ describe("auth", function () {
170
170
redis = new Redis ( { port : 17379 , username, password } ) ;
171
171
} ) ;
172
172
173
- it ( "should handle auth with Redis URL string with username and password (Redis >=6) (redis://foo:[email protected] /) correctly" , function ( done ) {
174
- let username = "user" ;
175
- let password = "pass" ;
176
- let redis ;
177
- new MockServer ( 17379 , function ( argv ) {
178
- if (
179
- argv [ 0 ] === "auth" &&
180
- argv [ 1 ] === username &&
181
- argv [ 2 ] === password
182
- ) {
183
- redis . disconnect ( ) ;
184
- done ( ) ;
185
- }
186
- } ) ;
187
- redis = new Redis ( `redis://user:pass@localhost:17379/` ) ;
188
- } ) ;
189
-
190
173
it ( 'should not emit "error" when the Redis >=6 server doesn\'t need auth' , function ( done ) {
191
174
new MockServer ( 17379 , function ( argv ) {
192
175
if ( argv [ 0 ] === "auth" && argv [ 1 ] === "pass" ) {
Original file line number Diff line number Diff line change @@ -193,7 +193,6 @@ describe("utils", function () {
193
193
port : "6380" ,
194
194
db : "4" ,
195
195
password : "pass" ,
196
- username : "user" ,
197
196
key : "value" ,
198
197
} ) ;
199
198
expect ( utils . parseURL ( "redis://127.0.0.1/" ) ) . to . eql ( {
@@ -206,7 +205,6 @@ describe("utils", function () {
206
205
port : "6380" ,
207
206
db : "4" ,
208
207
password : "pass" ,
209
- username : "user" ,
210
208
key : "value" ,
211
209
} ) ;
212
210
} ) ;
You can’t perform that action at this time.
0 commit comments