Fix the spec helper to apply selinux to agents only.
This commit is contained in:
parent
2816454b42
commit
001f3ae6ef
1 changed files with 18 additions and 16 deletions
|
@ -51,6 +51,23 @@ unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
|
||||||
#install_package host, 'ruby-augeas'
|
#install_package host, 'ruby-augeas'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
UNSUPPORTED_PLATFORMS = ['AIX','windows','Solaris','Suse']
|
||||||
|
|
||||||
|
RSpec.configure do |c|
|
||||||
|
# Project root
|
||||||
|
proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
||||||
|
|
||||||
|
# Readable test descriptions
|
||||||
|
c.formatter = :documentation
|
||||||
|
|
||||||
|
# Configure all nodes in nodeset
|
||||||
|
c.before :suite do
|
||||||
|
# Install module and dependencies
|
||||||
|
puppet_module_install(:source => proj_root, :module_name => 'postgresql')
|
||||||
|
|
||||||
# Set up selinux if appropriate.
|
# Set up selinux if appropriate.
|
||||||
if fact('osfamily') == 'RedHat' && fact('selinux') == 'true'
|
if fact('osfamily') == 'RedHat' && fact('selinux') == 'true'
|
||||||
pp = <<-EOS
|
pp = <<-EOS
|
||||||
|
@ -69,24 +86,9 @@ unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
|
||||||
}
|
}
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
apply_manifest(pp, :catch_failures => true)
|
apply_manifest_on(agents, pp, :catch_failures => true)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
UNSUPPORTED_PLATFORMS = ['AIX','windows','Solaris','Suse']
|
|
||||||
|
|
||||||
RSpec.configure do |c|
|
|
||||||
# Project root
|
|
||||||
proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
|
||||||
|
|
||||||
# Readable test descriptions
|
|
||||||
c.formatter = :documentation
|
|
||||||
|
|
||||||
# Configure all nodes in nodeset
|
|
||||||
c.before :suite do
|
|
||||||
# Install module and dependencies
|
|
||||||
puppet_module_install(:source => proj_root, :module_name => 'postgresql')
|
|
||||||
hosts.each do |host|
|
hosts.each do |host|
|
||||||
on host, "/bin/touch #{default['puppetpath']}/hiera.yaml"
|
on host, "/bin/touch #{default['puppetpath']}/hiera.yaml"
|
||||||
on host, 'chmod 755 /root'
|
on host, 'chmod 755 /root'
|
||||||
|
|
Loading…
Reference in a new issue