diff options
author | Josh Cooper <josh@puppet.com> | 2018-07-09 19:50:03 -0700 |
---|---|---|
committer | Josh Cooper <josh@puppet.com> | 2018-07-09 19:50:03 -0700 |
commit | 59f4a9e49d397556a60f060faffdc14b734856da (patch) | |
tree | 8b630a7d02fc4e6e207fc3d84b9d78c1f6637191 /spec/acceptance/tests/should_modify_alias.rb | |
parent | 34e83e11a5fc344195217d9cd159d022b5d89ec1 (diff) | |
download | puppet-hosts_core-59f4a9e49d397556a60f060faffdc14b734856da.tar.gz puppet-hosts_core-59f4a9e49d397556a60f060faffdc14b734856da.tar.bz2 |
Automatic validation updates
Updated rubocop violations using `pdk validate -a`.
Diffstat (limited to 'spec/acceptance/tests/should_modify_alias.rb')
-rw-r--r-- | spec/acceptance/tests/should_modify_alias.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/acceptance/tests/should_modify_alias.rb b/spec/acceptance/tests/should_modify_alias.rb index 07198b1..f2171f0 100644 --- a/spec/acceptance/tests/should_modify_alias.rb +++ b/spec/acceptance/tests/should_modify_alias.rb @@ -1,27 +1,27 @@ -test_name "should be able to modify a host alias" +test_name 'should be able to modify a host alias' tag 'audit:low', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' # Could be done at the integration (or unit) layer though - # actual changing of resources could irreparably damage a - # host running this, or require special permissions. +# actual changing of resources could irreparably damage a +# host running this, or require special permissions. agents.each do |agent| file = agent.tmpfile('host-modify-alias') - step "set up files for the test" + step 'set up files for the test' on agent, "printf '127.0.0.8 test alias\n' > #{file}" - step "modify the resource" + step 'modify the resource' on(agent, puppet_resource('host', 'test', "target=#{file}", - 'ensure=present', 'ip=127.0.0.8', 'host_aliases=banzai')) + 'ensure=present', 'ip=127.0.0.8', 'host_aliases=banzai')) - step "verify that the content was updated" + step 'verify that the content was updated' on(agent, "cat #{file}; rm -f #{file}") do - fail_test "the alias was not updated" unless - stdout =~ /^127\.0\.0\.8[[:space:]]+test[[:space:]]+banzai[[:space:]]*$/ + fail_test 'the alias was not updated' unless + stdout =~ %r{^127\.0\.0\.8[[:space:]]+test[[:space:]]+banzai[[:space:]]*$} end - step "clean up after the test" + step 'clean up after the test' on agent, "rm -f #{file}" end |