Skip to content

Commit 7d4fd61

Browse files
mhdawsonRafaelGSS
authored andcommitted
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 <[email protected]> PR-URL: #54926 Refs: #53382 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent d655d96 commit 7d4fd61

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/parallel/test-tls-junk-server.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ server.listen(0, function() {
2020
const req = https.request({ port: this.address().port });
2121
req.end();
2222

23+
let expectedErrorMessage = new RegExp('wrong version number');
24+
if (common.hasOpenSSL(3, 2)) {
25+
expectedErrorMessage = new RegExp('packet length too long');
26+
};
2327
req.once('error', common.mustCall(function(err) {
24-
assert(/wrong version number/.test(err.message));
28+
assert(expectedErrorMessage.test(err.message));
2529
server.close();
2630
}));
2731
});

0 commit comments

Comments
 (0)