Closed danielo515 closed 8 years ago
Hi @danielo515! I'm not familiar with the problem. I've just google it and found this http://stackoverflow.com/questions/27070433/ssl-handshake-requested-ssl-feature-not-available-in-this-build mongo-in-memory uses https://www.npmjs.com/package/mongodb-prebuilt which apparently is a mongodb built without ssl support. I think the problem is in the client you are using. The client is requesting a SSL connection which is not supported. You should change the client side so it doesn't use SSL to connect to the testing mongodb.
Hello @giorgio-zamparelli
Thanks for your prompt answer. My client is basically my unit tests. Of course I can not use any SSL option, but that requires a separate configuration file without SSL. But the more custom code I write for unit testing the less reliable they are. In an ideal scenario I will be able to use the same configuration file, then if the server understands SSL use it, and it it does not just ignore any SSL option passed.
I understand that your code is not generating the error, but it could intercept any configuration passed and remove the SSL configuration until it is implemented. This makes sense because your lib is a perfect fit for unit testing and, as I said, the most production code you can reuse the better.
Regards
If you know how to implement the solution you can clone this git repository, commit the changes to your clone and then do a Pull Request.
Otherwise I will need a a minimal gist or git repository that is running your unit testing and is showing the error you mentioned in order to reproduce it and understand how to fix the problem.
OK, that sounds fair enough.
Regards
found a solution or something else @danielo515 ?
To be honest, not a general usage solution. I wrote a hapi plugin that mocks the real hapi-mongodb plugin, and there I'm just deleting any SSL property before I connect.
Not clean, but I think my situation is so custom that it does not deserve anything better.
Anyway glad you figured it out!
Hello,
Thank you for your great software, it is helping me a lot with unit testing.
One thing that would be very handy is to ignore handshake configurations. Currently if I specify any tls configuration I get this error
So instead of throwing the following error just ignore that configurations. That will make my life easier because that way I will not need to build specific connection configurations for testing and development.
Thanks and regards