aboutsummaryrefslogtreecommitdiff
path: root/spec/acceptance/puppet.rb
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppet.com>2018-06-27 22:57:38 -0700
committerJosh Cooper <josh@puppet.com>2018-06-27 23:09:19 -0700
commitdf20c08345fba0b43833eef47c4da2fdd78523e9 (patch)
treeeccd5c48492f4240a8e6a269567c2439070d0719 /spec/acceptance/puppet.rb
parent1294290d6045fdd383a17cb45039b671ab954f05 (diff)
downloadpuppet-augeas_core-df20c08345fba0b43833eef47c4da2fdd78523e9.tar.gz
puppet-augeas_core-df20c08345fba0b43833eef47c4da2fdd78523e9.tar.bz2
Automatic update of rubocop violations
Add exclusions for: Layout/IndentHeredoc, Metrics/BlockNesting: Metrics/LineLength: Style/AccessorMethodName: Style/DoubleNegation: Style/MultipleComparison: Style/NumericPredicate: Style/PredicateName: Style/SignalException: Style/VariableName: SignalException is disabled because Puppet::Type#fail overrides Kernel#fail, and we really do want fail and not raise.
Diffstat (limited to 'spec/acceptance/puppet.rb')
-rw-r--r--spec/acceptance/puppet.rb19
1 files changed, 8 insertions, 11 deletions
diff --git a/spec/acceptance/puppet.rb b/spec/acceptance/puppet.rb
index 10fb159..048a3db 100644
--- a/spec/acceptance/puppet.rb
+++ b/spec/acceptance/puppet.rb
@@ -1,14 +1,13 @@
-test_name "Augeas puppet configuration" do
-
+test_name 'Augeas puppet configuration' do
tag 'risk:medium',
'audit:medium',
'audit:acceptance',
- 'audit:refactor' # move to types test dir
+ 'audit:refactor' # move to types test dir
skip_test 'requires augeas which is included in AIO' if @options[:type] != 'aio'
- confine :except, :platform => 'windows'
- confine :to, {}, hosts.select { |host| ! host[:roles].include?('master') }
+ confine :except, platform: 'windows'
+ confine :to, {}, hosts.reject { |host| host[:roles].include?('master') }
teardown do
agents.each do |agent|
@@ -17,17 +16,17 @@ test_name "Augeas puppet configuration" do
end
agents.each do |agent|
- step "Backup the puppet config" do
+ step 'Backup the puppet config' do
on agent, "mv #{agent.puppet['confdir']}/puppet.conf /tmp/puppet.conf.bak"
end
- step "Create a new puppet config that has a master and agent section" do
+ step 'Create a new puppet config that has a master and agent section' do
puppet_conf = <<-CONF
[main]
CONF
on agent, "echo \"#{puppet_conf}\" >> #{agent.puppet['confdir']}/puppet.conf"
end
- step "Modify the puppet.conf file" do
+ step 'Modify the puppet.conf file' do
manifest = <<-EOF
augeas { 'puppet agent noop mode':
context => "/files#{agent.puppet['confdir']}/puppet.conf/agent",
@@ -36,11 +35,9 @@ test_name "Augeas puppet configuration" do
changes => 'set noop true',
}
EOF
- on agent, puppet_apply('--verbose'), :stdin => manifest
+ on agent, puppet_apply('--verbose'), stdin: manifest
on agent, "grep 'noop=true' #{agent.puppet['confdir']}/puppet.conf"
end
-
end
-
end