Skip to content

Commit

Permalink
Merge pull request #256 from visioncritical/remove-selinux
Browse files Browse the repository at this point in the history
Fixes #242 & Reverts #253
  • Loading branch information
johnbellone committed Dec 15, 2015
2 parents df04559 + 47e1729 commit eedc49d
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 49 deletions.
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

0 comments on commit eedc49d

Please sign in to comment.