GeezerVison is showing github.com — test: update tests for OpenSSL 3.0.14 · nodejs/node@9f521f4
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-tls-alpn-server-client.js +4-2Lines changed: 4 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -195,7 +195,8 @@ function TestALPNCallback() { |
195 | 195 |
|
196 | 196 | // Callback picks 2nd preference => undefined => ALPN rejected: |
197 | 197 | assert.strictEqual(results[1].server, undefined); |
198 | | - assert.strictEqual(results[1].client.error.code, 'ECONNRESET'); |
| 198 | + const allowedErrors = ['ECONNRESET', 'ERR_SSL_TLSV1_ALERT_NO_APPLICATION_PROTOCOL']; |
| 199 | + assert.ok(allowedErrors.includes(results[1].client.error.code), `'${results[1].client.error.code}' was not one of ${allowedErrors}.`); |
199 | 200 |
|
200 | 201 | TestBadALPNCallback(); |
201 | 202 | }); |
@@ -218,7 +219,8 @@ function TestBadALPNCallback() { |
218 | 219 | runTest(clientsOptions, serverOptions, function(results) { |
219 | 220 | // Callback returns 'http/5' => doesn't match client ALPN => error & reset |
220 | 221 | assert.strictEqual(results[0].server, undefined); |
221 | | - assert.strictEqual(results[0].client.error.code, 'ECONNRESET'); |
| 222 | + const allowedErrors = ['ECONNRESET', 'ERR_SSL_TLSV1_ALERT_NO_APPLICATION_PROTOCOL']; |
| 223 | + assert.ok(allowedErrors.includes(results[0].client.error.code), `'${results[0].client.error.code}' was not one of ${allowedErrors}.`); |
222 | 224 |
|
223 | 225 | TestALPNOptionsCallback(); |
224 | 226 | }); |
|