jantman / serverspec-extended-types

A set of extended types for ServerSpec 2.x
MIT License
28 stars 8 forks source link

Add support for HTTPS (including self-signed certificates) #4

Closed thbar closed 7 years ago

thbar commented 7 years ago

In this PR, http_get is extended to allow targeting SSL-enabled servers. There is an extra option to bypass SSL verification, to be used for self-signed certificates (often used with Vagrant for instance).

Example:

describe http_get(443, 'vagrant-server.acme.com', '/', 1, 'https', true) do
  # SNIP
end

Ultimately I think using named parameters (keyword arguments) will be better, but I decided not to do it yet, to preserve compatibility.

thbar commented 7 years ago

I will update the README right away. Hold on!

codecov-io commented 7 years ago

Codecov Report

Merging #4 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master     #4   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           6      6           
  Lines         368    395   +27     
=====================================
+ Hits          368    395   +27
Impacted Files Coverage Δ
spec/types/http_get_spec.rb 100% <100%> (ø) :arrow_up:
lib/serverspec_extended_types/http_get.rb 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 87be164...63b0e90. Read the comment docs.

thbar commented 7 years ago

Readme has been updated.

jantman commented 7 years ago

@thbar apologies for not responding sooner. I should have this merged and a new release cut tonight or tomorrow.

jantman commented 7 years ago

@thbar thank you so much for the contribution!

This has been merged and released on rubygems.org as 0.1.0

thbar commented 7 years ago

No problem :-) It's not like you are under some sort of SLA!

Thanks for integrating this! Le mar. 16 mai 2017 à 02:32, Jason Antman notifications@github.com a écrit :

@thbar https://github.com/thbar thank you so much for the contribution!

This has been merged and released on rubygems.org as 0.1.0

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jantman/serverspec-extended-types/pull/4#issuecomment-301641698, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAnna96oDG5eeXtUxzhEY5OUDJerFc-ks5r6O6HgaJpZM4NZK8l .