palantirnet / drupal-skeleton

A Drupal project template for use with `composer create-project`.
Other
13 stars 3 forks source link

Behat support for SSL. #88

Open damontgomery opened 5 years ago

damontgomery commented 5 years ago

I ended up having to set the base url to http instead of https to get Circle CI to pass.

I tried the HTTPS and I was getting errors because my local cert is not valid.

I made this change to get it to work locally, but still get an error on Circle CI:

default:
  extensions:
    Behat\MinkExtension:
      sessions:
        my_session:
          goutte:
            guzzle_parameters:
              verify: false
        my_javascript_session:
          selenium2:
            wd_host: "http://127.0.0.1:8643/wd/hub"
      default_session: my_session
      javascript_session: my_javascript_session
      base_url: https://[MY SITE].local

error:

Given I am not logged in: cURL error 35: Unknown SSL protocol error in connection to [REDACTED].local:8000  (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) (GuzzleHttp\Exception\ConnectException)

I tried to set the CURLOPT_SSLVERSION, but couldn't figure it out.

See https://curl.haxx.se/libcurl/c/CURLOPT_SSLVERSION.html

guzzle_parameters:
  curl.options:
    CURLOPT_SSLVERSION: CURL_SSLVERSION_TLSv1_3
becw commented 5 years ago

Ahh -- on Circle, it's set up to run the site with the PHP's built in development server, so it's not set up to serve via https. I wonder whether that server can use https instead, since I've run into this issue as well and while minor, it's still a hurdle!