[fix] Partial fix for rejecting self-signed certs in tests

Since joyent/node@35607f3a2d, https and
tls modules validate server certificate by default. Turn this feature
off since we're using self-signed certificates in tests.

Currently wss tests are still failing, pending investigation.

Commited on a plane from Poznań to Munich.
This commit is contained in:
Maciej Małecki 2012-09-27 08:04:23 +02:00
parent eafdc744b6
commit 2e7d8a88f4
3 changed files with 5 additions and 2 deletions

View File

@ -46,7 +46,8 @@ https.createServer(helpers.https, function (req, res) {
httpProxy.createServer(8000, 'localhost', {
https: helpers.https,
target: {
https: true
https: true,
rejectUnauthorized: false
}
}).listen(8080);

View File

@ -91,6 +91,7 @@ exports.createProxyServer = function (options, callback) {
if (protocols.proxy === 'https') {
options.proxy.https = helpers.https;
}
options.proxy.rejectUnauthorized = false;
return httpProxy
.createServer(options.proxy)

View File

@ -27,6 +27,7 @@ exports.assertRequest = function (options) {
//
// Now make the HTTP request and assert.
//
options.request.rejectUnauthorized = false;
request(options.request, this.callback);
},
"should succeed": function (err, res, body) {
@ -320,4 +321,4 @@ exports.assertProxiedToRoutes = function (options, nested) {
}
return context;
};
};