Skip to content
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

InSpec smoke test improvements #1423

Merged
merged 1 commit into from
Nov 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions inspec/chef-server-smoke/controls/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,9 @@
end
end

# Only perform SSL verification on hosts where we know the SSL certs are
# properly configured
verify = false # TODO: switch this back after JEX-633 is complete
# verify = fetch_target_host.include?('cd.chef.co') ? false : true

chef_server_version = fetch_chef_server_version

describe http("https://#{fetch_target_host}/_status", ssl_verify: verify) do
describe http("https://#{fetch_target_host}/_status") do
its('status') { should eq 200 }
end

Expand Down
4 changes: 2 additions & 2 deletions inspec/chef-server-smoke/libraries/helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
def fetch_chef_server_version
attribute('application_version', default: ENV['CHEF_SERVER_VERSION'])
attribute('application_version', default: ENV['APPLICATION_VERSION'])
end

def fetch_target_host
attribute('target_host', default: command('grep -Po "api_fqdn\s[\"\']+\K.*(?=[\"\']+?)" /etc/opscode/chef-server.rb').stdout.strip)
inspec.backend.hostname
end