oesmith / puffing-billy

A rewriting web proxy for testing interactions between your browser and external sites. Works with ruby + rspec.
MIT License
660 stars 168 forks source link

CircleCI tests crashing #236

Closed madelineleclair closed 5 years ago

madelineleclair commented 6 years ago

I'm having an issue getting my tests that are using puffing-billy to run on CircleCI. I'm using puffing-billy to intercept jQuery ajax requests and send back mock responses for cucumber tests in a rails application. I'm using selenium_chrome_billy for the Javascript and browser. Everything is working locally, but when I try to run my cucumber tests on CircleCI, any test that is using selenium_chrome_billy crashes with the error 'Encryption is not available on this event-machine' and the tests are aborted.

I've followed the SSL setup in the documentation for CircleCI and building a docker image with OpenSSL for the tests, but neither has worked. Has anyone run across this issue with puffing-billy before?

nicedawg commented 6 years ago

@madeline1991 - I was having the same problem, and I think I've solved it. (Maybe you have by now, too.)

At least in my case, the problem seemed to be that the OS version included a version of OpenSSL that was too new for the version of the eventmachine gem that puffing-billy depends on.

Here's what I did to fix it. (Of course our setup might be different from yours... and I barely know what I'm doing with docker/CircleCI... so YMMV!)

I hope it helps! Or, if you've solved it a better way, please let me know!

operand commented 6 years ago

Just wanted to add that @nicedawg's suggestion fixed this issue for me. Specifically all I did was add an apt-get install libssl1.0-dev to our Dockerfile. Then when we bundle install as part of our build, event_machine builds it's native extensions and all works perfectly.