mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
test: ensure NODE_EXTRA_CA_CERTS not set before tests
The 'test-tls-env-extra-ca-file-load.js' test assumes that NODE_EXTRA_CA_CERTS is not set. If the build environment happens to have it set, this test will fail. This change deletes that env var before running the test. PR-URL: https://github.com/nodejs/node/pull/43858 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
ff20308475
commit
918448e239
1 file changed
+2
@@ -20,6 +20,8 @@ if (process.argv[2] !== 'child') {
|
||||
const NODE_EXTRA_CA_CERTS = fixtures.path('keys', 'ca1-cert.pem');
|
||||
const extendsEnv = (obj) => ({ ...process.env, ...obj });
|
||||
|
||||
// Remove any pre-existing extra CA certs.
|
||||
delete process.env.NODE_EXTRA_CA_CERTS;
|
||||
[
|
||||
extendsEnv({ CHILD_USE_EXTRA_CA_CERTS: 'yes', NODE_EXTRA_CA_CERTS }),
|
||||
extendsEnv({ CHILD_USE_EXTRA_CA_CERTS: 'no' }),
|
||||
|
||||
Reference in new issue
Block a user