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

Fixes #242 & Reverts #253 #256

Merged
merged 2 commits into from
Dec 15, 2015
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
2 changes: 1 addition & 1 deletion libraries/consul_ui.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ConsulUI < Chef::Resource

# @!attribute binary_url
# @return [String]
attribute(:binary_url, kind_of: String, default: 'https://releases.hashicorp.com/consul/%{version}/consul_%{filename}.zip')
attribute(:binary_url, kind_of: String, default: 'https://releases.hashicorp.com/consul/%{version}/%{filename}.zip')

# @!attribute source_url
# @return [String]
Expand Down
1 change: 0 additions & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
depends 'libartifact', '~> 1.3'
depends 'poise', '~> 2.2'
depends 'poise-service', '~> 1.0'
depends 'selinux', '~> 0.9'

source_url 'https://github.com/johnbellone/consul-cookbook' if respond_to?(:source_url)
issues_url 'https://github.com/johnbellone/consul-cookbook/issues' if respond_to?(:issues_url)
5 changes: 0 additions & 5 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
# Copyright 2014, 2015 Bloomberg Finance L.P.
#

if node['os'] == 'linux'
node.default['selinux']['state'] = 'permissive'
include_recipe 'selinux::default'
end

if node['firewall']['allow_consul']
include_recipe 'firewall::default'

Expand Down
42 changes: 0 additions & 42 deletions test/spec/recipes/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,4 @@
chef_run # This should not raise an error
end
end

context 'When selinux is set to be permissive, on a RHEL distribution' do
let(:chef_run) do
ChefSpec::SoloRunner.new do |node, server|
node.automatic['os'] = 'linux'
node.automatic['platform_family'] = 'rhel'
node.set['selinux']['state'] = 'permissive'
end.converge(described_recipe)
end

it 'selinux_state action is permissive' do
expect(chef_run).to permissive_selinux_state('SELinux Permissive')
end
end

context 'When selinux is set to be disabled, on a RHEL distribution' do
let(:chef_run) do
ChefSpec::SoloRunner.new do |node, server|
node.automatic['os'] = 'linux'
node.automatic['platform_family'] = 'rhel'
node.set['selinux']['state'] = 'disabled'
end.converge(described_recipe)
end

it 'selinux_state action is disabled' do
expect(chef_run).to disabled_selinux_state('SELinux Disabled')
end
end

context 'When selinux is set to be enforcing, on a RHEL distribution' do
let(:chef_run) do
ChefSpec::SoloRunner.new do |node, server|
node.automatic['os'] = 'linux'
node.automatic['platform_family'] = 'rhel'
node.set['selinux']['state'] = 'enforcing'
end.converge(described_recipe)
end

it 'selinux_state action is enforcing' do
expect(chef_run).to enforcing_selinux_state('SELinux Enforcing')
end
end
end