Skip to content

Commit 5047006

Browse files
danbevtargos
authored andcommitted
test: use regex for OpenSSL function name
This commit modifies test-crypt-scrypt.js to use a regular expression for the function name in the error message, similar to what is done for the error code. The motivation for this change comes from a case where we (Red Hat) patch OpenSSL and the memory limit checking is done in a different function, meaning that the function name from which this error originates differs from that when linking to the OpenSSL version shipped with Node.js. PR-URL: #28289 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent f21ddb2 commit 5047006

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/parallel/test-crypto-scrypt.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ for (const options of bad) {
169169

170170
for (const options of toobig) {
171171
const expected = {
172-
message: /error:[^:]+:digital envelope routines:EVP_PBE_scrypt:memory limit exceeded/,
172+
message: new RegExp('error:[^:]+:digital envelope routines:' +
173+
'(?:EVP_PBE_scrypt|scrypt_alg):memory limit exceeded'),
173174
type: Error,
174175
};
175176
common.expectsError(() => crypto.scrypt('pass', 'salt', 1, options, () => {}),

0 commit comments

Comments
 (0)