mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
test: adjust test-tls-junk-server for OpenSSL32
Refs: #53382 OpenSSL32 returns different error text. Looking through the test it seems like the expected error text has been adjusted for different OpenSSL versions in the past and what the test is testing is not related to the error being returned. Update test to allow for error returned by OpenSSL32 Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: https://github.com/nodejs/node/pull/54926 Refs: https://github.com/nodejs/node/issues/53382 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
3da465a815
commit
c77bcf0187
@ -20,8 +20,12 @@ server.listen(0, function() {
|
||||
const req = https.request({ port: this.address().port });
|
||||
req.end();
|
||||
|
||||
let expectedErrorMessage = new RegExp('wrong version number');
|
||||
if (common.hasOpenSSL(3, 2)) {
|
||||
expectedErrorMessage = new RegExp('packet length too long');
|
||||
};
|
||||
req.once('error', common.mustCall(function(err) {
|
||||
assert(/wrong version number/.test(err.message));
|
||||
assert(expectedErrorMessage.test(err.message));
|
||||
server.close();
|
||||
}));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user