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

Rubocop and other updates/fixes for TK #62

Merged
merged 3 commits into from
Jan 18, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions test/cookbooks/openstack_test/recipes/cacert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,20 @@
EOF
creates '/tmp/cacert'
end

# Make sure ruby knows to use the ca-bundle certs as authority so that our self signed cert gets verified properly.
# NOTE: This is only needed for testing, not production.
ruby_block 'set ca_file' do
block do
require 'net/https'

Net::HTTP.class_eval do
alias_method :_use_ssl=, :use_ssl=

def use_ssl=(boolean)
self.ca_file = '/etc/ssl/certs/ca-bundle.crt'
self._use_ssl = boolean
end
end
end
end
1 change: 1 addition & 0 deletions test/integration/roles/openstack_tk.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"env_run_lists": {},
"run_list": [
"recipe[openstack_test::hosts]",
"recipe[openstack_test::cacert]",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where exactly is this cookbook openstack_test ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test kitchen works well btw 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@knightsamar it's in the cookbook, look at Berksfile to see where exactly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This is an interesting setup. Hopefully I can make time to read the code and understand how you are making these things work.

"recipe[osl-openstack]"
],
"chef_type": "role",
Expand Down