Skip to content

Commit 76110b0

Browse files
mhdawsontargos
authored andcommittedOct 2, 2024
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: #54926 Refs: #53382 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent b048eae commit 76110b0

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)
Please sign in to comment.