summaryrefslogtreecommitdiff
path: root/test/internet
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2020-08-27 21:18:49 -0700
committerRich Trott <rtrott@gmail.com>2020-08-29 22:40:57 -0700
commit4fa439c5feafd31b26e083ce9f6642faf51c981e (patch)
tree22c56869e06364774678b97622e28b44ccd92c49 /test/internet
parent33eda8046e59b672dbdc57183446bfa922f96ce5 (diff)
downloadnode-new-4fa439c5feafd31b26e083ce9f6642faf51c981e.tar.gz
test: make test-tls-reuse-host-from-socket pass without internet
Start up a TLS server on localhost rather than using example.org. PR-URL: https://github.com/nodejs/node/pull/34953 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/internet')
-rw-r--r--test/internet/test-tls-reuse-host-from-socket.js37
1 files changed, 0 insertions, 37 deletions
diff --git a/test/internet/test-tls-reuse-host-from-socket.js b/test/internet/test-tls-reuse-host-from-socket.js
deleted file mode 100644
index f7093856c6..0000000000
--- a/test/internet/test-tls-reuse-host-from-socket.js
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-'use strict';
-const common = require('../common');
-
-if (!common.hasCrypto)
- common.skip('missing crypto');
-
-const tls = require('tls');
-
-const net = require('net');
-
-const socket = net.connect(443, 'www.example.org', common.mustCall(() => {
- const secureSocket = tls.connect({ socket }, common.mustCall(() => {
- secureSocket.destroy();
- console.log('ok');
- }));
-}));