mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix proper closing of http request test ssl/proxy servers
This commit is contained in:
parent
20cf91f1dc
commit
2fef6fd1fa
@ -68,11 +68,11 @@ describe('HTTP Request Node', function() {
|
||||
An optional company name []:
|
||||
*/
|
||||
};
|
||||
testSslServer = https.createServer(sslOptions,testApp);
|
||||
testSslServer = stoppable(https.createServer(sslOptions,testApp));
|
||||
testSslServer.listen(testSslPort);
|
||||
|
||||
testProxyPort += 1;
|
||||
testProxyServer = httpProxy.createProxyServer({target:'http://localhost:' + testPort});
|
||||
testProxyServer = stoppable(httpProxy.createProxyServer({target:'http://localhost:' + testPort}));
|
||||
testProxyServer.on('proxyReq', function(proxyReq, req, res, options) {
|
||||
proxyReq.setHeader('x-testproxy-header', 'foobar');
|
||||
});
|
||||
@ -217,8 +217,11 @@ describe('HTTP Request Node', function() {
|
||||
|
||||
after(function(done) {
|
||||
testServer.stop(() => {
|
||||
testProxyServer.close();
|
||||
helper.stopServer(done);
|
||||
testProxyServer.stop(() => {
|
||||
testSslServer.stop(() => {
|
||||
helper.stopServer(done);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user