Skip to content

test-tls-env-extra-ca-file-load fails to test assertions #32072

Closed
@ebickle

Description

  • Version: master (v14.0.0-pre)
  • Platform: Windows 10 Version 1903 64-bit (OS Build 18362.657)
  • Subsystem: crypto / tls

What steps will reproduce the bug?

Bug identified in a code review and cannot be directly reproduced: a unit test silently succeeds without executing it's assertions or running any tests.

The unit test test-tls-env-extra-ca-file-load.js attempts to fork two child processes with the NODE_EXTRA_CA_CERTS environment variable set and unset. The unit test logic of the parent process and child process are gated inside of a if (process.argv[2] !== 'child') statement.

The code blocks for the parent and child processes are swapped. During execution the child process argument is not set and the code falls into the assertion block. The CHILD_USE_EXTRA_CA_CERTS isn't set to yes or no, causing all assertions to be bypassed and the unit test to exit without doing anything. The process is never forked.

How often does it reproduce? Is there a required condition?

Reproduces 100% of the time.

What is the expected behavior?

The unit test should fork two child processes and execute the appropriate assertions.

What do you see instead?

Unit test silently finishes without forking any child processes or running assertions.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions