-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: add crypto's setEngine test #10786
test: add crypto's setEngine test #10786
Conversation
This is a difficult one to test because it's entirely dependent on a number of factors that are not under our control (such as what other engines may be available on the OS being tested). It's definitely something that we should try to get fixed and tested tho so I really appreciate the effort here. |
@nodejs/crypto |
Thank you for the answer. So leave only the exception tests.(verification tests for |
8c9799b
to
51a0a0c
Compare
51a0a0c
to
54172a9
Compare
It also shows up as missing coverage in the code coverage numbers:https://coverage.nodejs.org/coverage-57f6a106fbc69a47/root/crypto.js.html ==> line 621 So good to add a test. Ideally we would have some sort of dummy engine that we could actually set, but it seems like a good start to at least test the failure cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, provided CI passes.
Failures in CI appear to be unrelated but just in case: https://ci.nodejs.org/job/node-test-pull-request/5888/ |
I think we can make tests for both static and dynamic engines by adding new |
That would be worthwhile, I think. |
Here is WIP of my PR in 0312f084d43e220c0448f80c6144a3d1f8877426 for |
Updates on this one? |
This was already fixed in #11143. Closing. |
Add tests for
crypto.setEngine
.https://github.com/nodejs/node/blob/master/lib/crypto.js#L621
There is not a normal test because I did not have an idea that how to designate the engine(path or id) in the test :'-(
error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test