From 6a71be247473f8561d3e2dc655fba7d3bb686381 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 9 Jul 2018 23:45:32 -0700 Subject: Convert modify based tests to rspec Consolidate tests relating to modifying host entries. --- spec/acceptance/tests/modify_alias_spec.rb | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 spec/acceptance/tests/modify_alias_spec.rb (limited to 'spec/acceptance/tests/modify_alias_spec.rb') diff --git a/spec/acceptance/tests/modify_alias_spec.rb b/spec/acceptance/tests/modify_alias_spec.rb deleted file mode 100644 index f2171f0..0000000 --- a/spec/acceptance/tests/modify_alias_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -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. - -agents.each do |agent| - file = agent.tmpfile('host-modify-alias') - - step 'set up files for the test' - on agent, "printf '127.0.0.8 test alias\n' > #{file}" - - step 'modify the resource' - on(agent, puppet_resource('host', 'test', "target=#{file}", - 'ensure=present', 'ip=127.0.0.8', 'host_aliases=banzai')) - - step 'verify that the content was updated' - on(agent, "cat #{file}; rm -f #{file}") do - 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' - on agent, "rm -f #{file}" -end -- cgit v1.2.3