Open
Description
1) lib/http-proxy.js
#createProxyServer using the ws-incoming passes
should pass all set-cookie headers to client:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/tmp/node-http-proxy/test/lib-http-proxy-test.js)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
2) lib/http-proxy.js
#createProxyServer using the ws-incoming passes
should detect a proxyReq event and modify headers:
Uncaught TypeError: Cannot read property 'headers' of undefined
at WebSocketServer.<anonymous> (test/lib-http-proxy-test.js:566:34)
at /tmp/node-http-proxy/node_modules/ws/lib/websocket-server.js:90:18
at WebSocketServer.completeUpgrade (node_modules/ws/lib/websocket-server.js:321:5)
at WebSocketServer.handleUpgrade (node_modules/ws/lib/websocket-server.js:245:10)
at Server.upgrade (node_modules/ws/lib/websocket-server.js:89:16)
at onParserExecuteCommon (_http_server.js:585:14)
at onParserExecute (_http_server.js:525:3)
3) lib/http-proxy.js
HTTPS #createProxyServer
HTTPS to HTTP
should proxy the request en send back the response:
Error: error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small
at Object.createSecureContext (_tls_common.js:131:17)
at Server.setSecureContext (_tls_wrap.js:1152:27)
at Server (_tls_wrap.js:1029:8)
at new Server (https.js:65:14)
at Object.createServer (https.js:89:10)
at ProxyServer.listen (lib/http-proxy/index.js:29:471)
at Context.<anonymous> (test/lib-https-proxy-test.js:41:12)
at processImmediate (internal/timers.js:439:21)
4) lib/http-proxy.js
HTTPS #createProxyServer
HTTP to HTTPS
should proxy the request en send back the response:
Error: error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small
at Object.createSecureContext (_tls_common.js:131:17)
at Server.setSecureContext (_tls_wrap.js:1152:27)
at Server (_tls_wrap.js:1029:8)
at new Server (https.js:65:14)
at Object.createServer (https.js:89:10)
at Context.<anonymous> (test/lib-https-proxy-test.js:67:28)
at processImmediate (internal/timers.js:439:21)
5) lib/http-proxy.js
HTTPS #createProxyServer
HTTPS to HTTPS
should proxy the request en send back the response:
Error: error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small
at Object.createSecureContext (_tls_common.js:131:17)
at Server.setSecureContext (_tls_wrap.js:1152:27)
at Server (_tls_wrap.js:1029:8)
at new Server (https.js:65:14)
at Object.createServer (https.js:89:10)
at Context.<anonymous> (test/lib-https-proxy-test.js:108:28)
at processImmediate (internal/timers.js:439:21)
6) lib/http-proxy.js
HTTPS #createProxyServer
HTTPS not allow SSL self signed
should fail with error:
Error: error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small
at Object.createSecureContext (_tls_common.js:131:17)
at Server.setSecureContext (_tls_wrap.js:1152:27)
at Server (_tls_wrap.js:1029:8)
at new Server (https.js:65:14)
at Object.createServer (https.js:89:10)
at Context.<anonymous> (test/lib-https-proxy-test.js:155:28)
at processImmediate (internal/timers.js:439:21)
7) lib/http-proxy.js
HTTPS #createProxyServer
HTTPS to HTTP using own server
should proxy the request en send back the response:
Error: error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small
at Object.createSecureContext (_tls_common.js:131:17)
at Server.setSecureContext (_tls_wrap.js:1152:27)
at Server (_tls_wrap.js:1029:8)
at new Server (https.js:65:14)
at Object.createServer (https.js:89:10)
at Context.<anonymous> (test/lib-https-proxy-test.js:201:31)
at processImmediate (internal/timers.js:439:21)
after update key size:
$ cd test/fixtures
$ rm agent2-*
$ openssl genrsa -out ./agent2-key.pem 2048
$ openssl req -config agent2.cnf -new -key agent2-key.pem -out agent2-csr.pem
$ openssl x509 -req -in agent2-csr.pem -signkey agent2-key.pem -out agent2-cert.pem
Signature ok
subject=C = US, ST = CA, L = SF, O = Joyent, OU = Node.js, CN = agent2, emailAddress = ry@tinyclouds.org
Getting Private key
Also test fails:
#createProxyServer using the ws-incoming passes
✓ should proxy the websockets stream
✓ should emit error on proxy error
✓ should close client socket if upstream is closed before upgrade
✓ should proxy a socket.io stream
✓ should emit open and close events when socket.io client connects and disconnects
1) should pass all set-cookie headers to client
2) should detect a proxyReq event and modify headers
✓ should forward frames with single frame payload (including on node 4.x)
✓ should forward continuation frames with big payload (including on node 4.x)
lib/http-proxy.js
HTTPS #createProxyServer
HTTPS to HTTP
✓ should proxy the request en send back the response
HTTP to HTTPS
(node:9149) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version.
✓ should proxy the request en send back the response
HTTPS to HTTPS
✓ should proxy the request en send back the response
HTTPS not allow SSL self signed
✓ should fail with error
HTTPS to HTTP using own server
✓ should proxy the request en send back the response
114 passing (2s)
3 pending
2 failing
1) lib/http-proxy.js
#createProxyServer using the ws-incoming passes
should pass all set-cookie headers to client:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/tmp/node-http-proxy/test/lib-http-proxy-test.js)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
2) lib/http-proxy.js
#createProxyServer using the ws-incoming passes
should detect a proxyReq event and modify headers:
Uncaught TypeError: Cannot read property 'headers' of undefined
at WebSocketServer.<anonymous> (test/lib-http-proxy-test.js:566:34)
at /tmp/node-http-proxy/node_modules/ws/lib/websocket-server.js:90:18
at WebSocketServer.completeUpgrade (node_modules/ws/lib/websocket-server.js:321:5)
at WebSocketServer.handleUpgrade (node_modules/ws/lib/websocket-server.js:245:10)
at Server.upgrade (node_modules/ws/lib/websocket-server.js:89:16)
at onParserExecuteCommon (_http_server.js:585:14)
at onParserExecute (_http_server.js:525:3)
events.js:177
throw er; // Unhandled 'error' event
^
Error: socket hang up
at connResetException (internal/errors.js:559:14)
at Socket.socketOnEnd (_http_client.js:436:23)
at Socket.emit (events.js:205:15)
at endReadableNT (_stream_readable.js:1154:12)
at processTicksAndRejections (internal/process/task_queues.js:84:9)
Emitted 'error' event at:
at Socket.socketOnEnd (_http_client.js:436:9)
at Socket.emit (events.js:205:15)
at endReadableNT (_stream_readable.js:1154:12)
at processTicksAndRejections (internal/process/task_queues.js:84:9) {
code: 'ECONNRESET'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @tgrx/http-proxy@1.17.2 mocha: `mocha test/*-test.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @tgrx/http-proxy@1.17.2 mocha script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/sweb/.npm/_logs/2019-06-20T22_36_36_094Z-debug.log
-----------------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
-----------------------|----------|----------|----------|----------|-------------------|
All files | 89.09 | 81.91 | 91.53 | 91.46 | |
lib | 100 | 100 | 100 | 100 | |
http-proxy.js | 100 | 100 | 100 | 100 | |
lib/http-proxy | 84.18 | 76.98 | 85.19 | 86.09 | |
common.js | 97.14 | 94.59 | 100 | 97.14 | 58,230 |
index.js | 73.86 | 51.92 | 76.47 | 76.54 |... 78,179,182,184 |
lib/http-proxy/passes | 93.14 | 85.9 | 96.77 | 96.23 | |
web-incoming.js | 95.65 | 82.09 | 100 | 98.33 | 187 |
web-outgoing.js | 98.08 | 96.23 | 100 | 100 | 91,122 |
ws-incoming.js | 85.19 | 77.78 | 90.91 | 89.8 | 90,91,93,132,155 |
-----------------------|----------|----------|----------|----------|-------------------|
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @tgrx/http-proxy@1.17.2 test: `nyc --reporter=text --reporter=lcov npm run mocha`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @tgrx/http-proxy@1.17.2 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/sweb/.npm/_logs/2019-06-20T22_36_36_657Z-debug.log
Metadata
Metadata
Assignees
Labels
No labels