File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
test/integration/proxying Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -521,18 +521,18 @@ nodeOnly(() => {
521
521
it ( "should return a 502 for failing upstream requests by default" , async ( ) => {
522
522
await server . forAnyRequest ( ) . thenPassThrough ( ) ;
523
523
524
- const response = await http2ProxyRequest ( server , `https://invalid. example` ) ;
524
+ const response = await http2ProxyRequest ( server , `https://example.invalid ` ) ;
525
525
526
526
expect ( response . headers [ ':status' ] ) . to . equal ( 502 ) ;
527
- expect ( response . body . toString ( 'utf8' ) ) . to . include ( "ENOTFOUND invalid. example" ) ;
527
+ expect ( response . body . toString ( 'utf8' ) ) . to . include ( "ENOTFOUND example.invalid " ) ;
528
528
} ) ;
529
529
530
530
it ( "should simulate connection errors for failing upstream requests if enabled" , async ( ) => {
531
531
await server . forAnyRequest ( ) . thenPassThrough ( {
532
532
simulateConnectionErrors : true
533
533
} ) ;
534
534
535
- const result = await http2ProxyRequest ( server , `https://invalid. example` )
535
+ const result = await http2ProxyRequest ( server , `https://example.invalid ` )
536
536
. catch ( e => e ) ;
537
537
538
538
expect ( result ) . to . be . instanceof ( Error ) ;
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ nodeOnly(() => {
213
213
port : remoteServer . port
214
214
} ) ;
215
215
216
- expect ( ( await seenFinalRequest ) . url ) . to . equal ( `http://fixed.localhost:8000 /` ) ; // Host header updated
216
+ expect ( ( await seenFinalRequest ) . url ) . to . equal ( `http://fixed.localhost:${ remoteServer . port } /` ) ; // Host header updated
217
217
expect ( ( await passthroughEvent ) . hostname ) . to . equal ( 'fixed.localhost' ) ;
218
218
expect ( ( await passthroughEvent ) . port ) . to . equal ( remoteServer . port . toString ( ) ) ;
219
219
} ) ;
You can’t perform that action at this time.
0 commit comments