From fa61bde37d75c0482d0a0d8822d635a1bc02662b Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 9 Jul 2018 22:30:55 -0700 Subject: Rename beaker tests to end with _spec --- spec/acceptance/tests/create_aliases_spec.rb | 24 +++++++++++++++ spec/acceptance/tests/create_spec.rb | 23 +++++++++++++++ spec/acceptance/tests/destroy_spec.rb | 27 +++++++++++++++++ spec/acceptance/tests/modify_alias_spec.rb | 27 +++++++++++++++++ spec/acceptance/tests/modify_ip_spec.rb | 27 +++++++++++++++++ spec/acceptance/tests/not_create_existing_spec.rb | 24 +++++++++++++++ ..._2289_should_not_destroy_data_when_malformed.rb | 31 -------------------- ..._should_not_destroy_data_when_malformed_spec.rb | 31 ++++++++++++++++++++ spec/acceptance/tests/query_all_spec.rb | 34 ++++++++++++++++++++++ spec/acceptance/tests/should_create.rb | 23 --------------- spec/acceptance/tests/should_create_aliases.rb | 24 --------------- spec/acceptance/tests/should_destroy.rb | 27 ----------------- spec/acceptance/tests/should_modify_alias.rb | 27 ----------------- spec/acceptance/tests/should_modify_ip.rb | 27 ----------------- .../acceptance/tests/should_not_create_existing.rb | 24 --------------- spec/acceptance/tests/should_query_all.rb | 34 ---------------------- .../ticket_4131_should_not_create_without_ip.rb | 31 -------------------- ...icket_4131_should_not_create_without_ip_spec.rb | 31 ++++++++++++++++++++ 18 files changed, 248 insertions(+), 248 deletions(-) create mode 100644 spec/acceptance/tests/create_aliases_spec.rb create mode 100644 spec/acceptance/tests/create_spec.rb create mode 100644 spec/acceptance/tests/destroy_spec.rb create mode 100644 spec/acceptance/tests/modify_alias_spec.rb create mode 100644 spec/acceptance/tests/modify_ip_spec.rb create mode 100644 spec/acceptance/tests/not_create_existing_spec.rb delete mode 100644 spec/acceptance/tests/pup_2289_should_not_destroy_data_when_malformed.rb create mode 100644 spec/acceptance/tests/pup_2289_should_not_destroy_data_when_malformed_spec.rb create mode 100644 spec/acceptance/tests/query_all_spec.rb delete mode 100644 spec/acceptance/tests/should_create.rb delete mode 100644 spec/acceptance/tests/should_create_aliases.rb delete mode 100644 spec/acceptance/tests/should_destroy.rb delete mode 100644 spec/acceptance/tests/should_modify_alias.rb delete mode 100644 spec/acceptance/tests/should_modify_ip.rb delete mode 100644 spec/acceptance/tests/should_not_create_existing.rb delete mode 100644 spec/acceptance/tests/should_query_all.rb delete mode 100644 spec/acceptance/tests/ticket_4131_should_not_create_without_ip.rb create mode 100644 spec/acceptance/tests/ticket_4131_should_not_create_without_ip_spec.rb (limited to 'spec/acceptance/tests') diff --git a/spec/acceptance/tests/create_aliases_spec.rb b/spec/acceptance/tests/create_aliases_spec.rb new file mode 100644 index 0000000..a76263a --- /dev/null +++ b/spec/acceptance/tests/create_aliases_spec.rb @@ -0,0 +1,24 @@ +test_name 'host should create aliases' + +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| + target = agent.tmpfile('host-create-aliases') + + step 'clean up the system for testing' + on agent, "rm -f #{target}" + + step 'create the record' + on(agent, puppet_resource('host', 'test', 'ensure=present', + 'ip=127.0.0.7', "target=#{target}", 'host_aliases=alias')) + + step 'verify that the aliases were added' + on(agent, "cat #{target} ; rm -f #{target}") do + fail_test 'alias was missing' unless + stdout =~ %r{^127\.0\.0\.7[[:space:]]+test[[:space:]]alias} + end +end diff --git a/spec/acceptance/tests/create_spec.rb b/spec/acceptance/tests/create_spec.rb new file mode 100644 index 0000000..3ce34e8 --- /dev/null +++ b/spec/acceptance/tests/create_spec.rb @@ -0,0 +1,23 @@ +test_name 'host should create' + +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| + target = agent.tmpfile('host-create') + + step 'clean up for the test' + on agent, "rm -f #{target}" + + step 'create the host record' + on(agent, puppet_resource('host', 'test', 'ensure=present', + 'ip=127.0.0.1', "target=#{target}")) + + step 'verify that the record was created' + on(agent, "cat #{target} ; rm -f #{target}") do + fail_test 'record was not present' unless stdout =~ %r{^127\.0\.0\.1[[:space:]]+test} + end +end diff --git a/spec/acceptance/tests/destroy_spec.rb b/spec/acceptance/tests/destroy_spec.rb new file mode 100644 index 0000000..f55c24b --- /dev/null +++ b/spec/acceptance/tests/destroy_spec.rb @@ -0,0 +1,27 @@ +test_name 'should be able to remove a host record' + +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-destroy') + line = '127.0.0.7 test1' + + step 'set up files for the test' + on agent, "printf '#{line}\n' > #{file}" + + step 'delete the resource from the file' + on(agent, puppet_resource('host', 'test1', "target=#{file}", + 'ensure=absent', 'ip=127.0.0.7')) + + step 'verify that the content was removed' + on(agent, "cat #{file}; rm -f #{file}") do + fail_test 'the content was still present' if stdout.include? line + end + + step 'clean up after the test' + on agent, "rm -f #{file}" +end diff --git a/spec/acceptance/tests/modify_alias_spec.rb b/spec/acceptance/tests/modify_alias_spec.rb new file mode 100644 index 0000000..f2171f0 --- /dev/null +++ b/spec/acceptance/tests/modify_alias_spec.rb @@ -0,0 +1,27 @@ +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 diff --git a/spec/acceptance/tests/modify_ip_spec.rb b/spec/acceptance/tests/modify_ip_spec.rb new file mode 100644 index 0000000..22019b7 --- /dev/null +++ b/spec/acceptance/tests/modify_ip_spec.rb @@ -0,0 +1,27 @@ +test_name 'should be able to modify a host address' + +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-ip') + + step 'set up files for the test' + on agent, "printf '127.0.0.9 test alias\n' > #{file}" + + step 'modify the resource' + on(agent, puppet_resource('host', 'test', "target=#{file}", + 'ensure=present', 'ip=127.0.0.10', 'host_aliases=alias')) + + step 'verify that the content was updated' + on(agent, "cat #{file}; rm -f #{file}") do + fail_test 'the address was not updated' unless + stdout =~ %r{^127\.0\.0\.10[[:space:]]+test[[:space:]]+alias[[:space:]]*$} + end + + step 'clean up after the test' + on agent, "rm -f #{file}" +end diff --git a/spec/acceptance/tests/not_create_existing_spec.rb b/spec/acceptance/tests/not_create_existing_spec.rb new file mode 100644 index 0000000..31686bc --- /dev/null +++ b/spec/acceptance/tests/not_create_existing_spec.rb @@ -0,0 +1,24 @@ +test_name 'should not create host if it exists' + +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-not-create-existing') + + step 'set up the system for the test' + on agent, "printf '127.0.0.2 test alias\n' > #{file}" + + step 'tell puppet to ensure the host exists' + on(agent, puppet_resource('host', 'test', "target=#{file}", + 'ensure=present', 'ip=127.0.0.2', 'host_aliases=alias')) do + fail_test 'darn, we created the host record' if + stdout.include? '/Host[test1]/ensure: created' + end + + step 'clean up after we created things' + on agent, "rm -f #{file}" +end diff --git a/spec/acceptance/tests/pup_2289_should_not_destroy_data_when_malformed.rb b/spec/acceptance/tests/pup_2289_should_not_destroy_data_when_malformed.rb deleted file mode 100644 index 95cf6ed..0000000 --- a/spec/acceptance/tests/pup_2289_should_not_destroy_data_when_malformed.rb +++ /dev/null @@ -1,31 +0,0 @@ -test_name 'should not delete data when existing content is malformed' - -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-not-delete-data') - - teardown do - on(agent, "rm -f #{file}", acceptable_exit_codes: (0..255)) - end - - step '(setup) populate test file with host information' - on(agent, "printf '127.0.0.2 existing alias\n' > #{file}") - - step '(setup) populate test file with a malformed line' - on(agent, "printf '==\n' >> #{file}") - - step 'tell puppet to add another host entry' - on(agent, puppet_resource('host', 'test', "target=#{file}", - 'ensure=present', 'ip=127.0.0.3', 'host_aliases=foo')) - - step 'verify that the initial host entry was not deleted' - on(agent, "cat #{file}") do |res| - fail_test 'existing host data was deleted' unless - res.stdout.include? 'existing' - end -end diff --git a/spec/acceptance/tests/pup_2289_should_not_destroy_data_when_malformed_spec.rb b/spec/acceptance/tests/pup_2289_should_not_destroy_data_when_malformed_spec.rb new file mode 100644 index 0000000..95cf6ed --- /dev/null +++ b/spec/acceptance/tests/pup_2289_should_not_destroy_data_when_malformed_spec.rb @@ -0,0 +1,31 @@ +test_name 'should not delete data when existing content is malformed' + +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-not-delete-data') + + teardown do + on(agent, "rm -f #{file}", acceptable_exit_codes: (0..255)) + end + + step '(setup) populate test file with host information' + on(agent, "printf '127.0.0.2 existing alias\n' > #{file}") + + step '(setup) populate test file with a malformed line' + on(agent, "printf '==\n' >> #{file}") + + step 'tell puppet to add another host entry' + on(agent, puppet_resource('host', 'test', "target=#{file}", + 'ensure=present', 'ip=127.0.0.3', 'host_aliases=foo')) + + step 'verify that the initial host entry was not deleted' + on(agent, "cat #{file}") do |res| + fail_test 'existing host data was deleted' unless + res.stdout.include? 'existing' + end +end diff --git a/spec/acceptance/tests/query_all_spec.rb b/spec/acceptance/tests/query_all_spec.rb new file mode 100644 index 0000000..cc92566 --- /dev/null +++ b/spec/acceptance/tests/query_all_spec.rb @@ -0,0 +1,34 @@ +test_name 'should query all hosts from hosts file' + +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. + +content = '127.0.0.1 test1 test1.local +127.0.0.2 test2 test2.local +127.0.0.3 test3 test3.local +127.0.0.4 test4 test4.local +' + +agents.each do |agent| + backup = agent.tmpfile('host-query-all') + + step 'configure the system for testing (including file backups)' + on agent, "cp /etc/hosts #{backup}" + on agent, 'cat > /etc/hosts', stdin: content + + step 'query all host records using puppet' + on(agent, puppet_resource('host')) do + found = stdout.scan(%r{host \{ '([^']+)'}).flatten.sort + fail_test "the list of returned hosts was wrong: #{found.join(', ')}" unless + found == ['test1', 'test2', 'test3', 'test4'] + + count = stdout.scan(%r{ensure\s+=>\s+'present'}).length + fail_test "found #{count} records, wanted 4" unless count == 4 + end + + step 'clean up the system afterwards' + on agent, "cat #{backup} > /etc/hosts && rm -f #{backup}" +end diff --git a/spec/acceptance/tests/should_create.rb b/spec/acceptance/tests/should_create.rb deleted file mode 100644 index 3ce34e8..0000000 --- a/spec/acceptance/tests/should_create.rb +++ /dev/null @@ -1,23 +0,0 @@ -test_name 'host should create' - -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| - target = agent.tmpfile('host-create') - - step 'clean up for the test' - on agent, "rm -f #{target}" - - step 'create the host record' - on(agent, puppet_resource('host', 'test', 'ensure=present', - 'ip=127.0.0.1', "target=#{target}")) - - step 'verify that the record was created' - on(agent, "cat #{target} ; rm -f #{target}") do - fail_test 'record was not present' unless stdout =~ %r{^127\.0\.0\.1[[:space:]]+test} - end -end diff --git a/spec/acceptance/tests/should_create_aliases.rb b/spec/acceptance/tests/should_create_aliases.rb deleted file mode 100644 index a76263a..0000000 --- a/spec/acceptance/tests/should_create_aliases.rb +++ /dev/null @@ -1,24 +0,0 @@ -test_name 'host should create aliases' - -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| - target = agent.tmpfile('host-create-aliases') - - step 'clean up the system for testing' - on agent, "rm -f #{target}" - - step 'create the record' - on(agent, puppet_resource('host', 'test', 'ensure=present', - 'ip=127.0.0.7', "target=#{target}", 'host_aliases=alias')) - - step 'verify that the aliases were added' - on(agent, "cat #{target} ; rm -f #{target}") do - fail_test 'alias was missing' unless - stdout =~ %r{^127\.0\.0\.7[[:space:]]+test[[:space:]]alias} - end -end diff --git a/spec/acceptance/tests/should_destroy.rb b/spec/acceptance/tests/should_destroy.rb deleted file mode 100644 index f55c24b..0000000 --- a/spec/acceptance/tests/should_destroy.rb +++ /dev/null @@ -1,27 +0,0 @@ -test_name 'should be able to remove a host record' - -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-destroy') - line = '127.0.0.7 test1' - - step 'set up files for the test' - on agent, "printf '#{line}\n' > #{file}" - - step 'delete the resource from the file' - on(agent, puppet_resource('host', 'test1', "target=#{file}", - 'ensure=absent', 'ip=127.0.0.7')) - - step 'verify that the content was removed' - on(agent, "cat #{file}; rm -f #{file}") do - fail_test 'the content was still present' if stdout.include? line - end - - step 'clean up after the test' - on agent, "rm -f #{file}" -end diff --git a/spec/acceptance/tests/should_modify_alias.rb b/spec/acceptance/tests/should_modify_alias.rb deleted file mode 100644 index f2171f0..0000000 --- a/spec/acceptance/tests/should_modify_alias.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 diff --git a/spec/acceptance/tests/should_modify_ip.rb b/spec/acceptance/tests/should_modify_ip.rb deleted file mode 100644 index 22019b7..0000000 --- a/spec/acceptance/tests/should_modify_ip.rb +++ /dev/null @@ -1,27 +0,0 @@ -test_name 'should be able to modify a host address' - -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-ip') - - step 'set up files for the test' - on agent, "printf '127.0.0.9 test alias\n' > #{file}" - - step 'modify the resource' - on(agent, puppet_resource('host', 'test', "target=#{file}", - 'ensure=present', 'ip=127.0.0.10', 'host_aliases=alias')) - - step 'verify that the content was updated' - on(agent, "cat #{file}; rm -f #{file}") do - fail_test 'the address was not updated' unless - stdout =~ %r{^127\.0\.0\.10[[:space:]]+test[[:space:]]+alias[[:space:]]*$} - end - - step 'clean up after the test' - on agent, "rm -f #{file}" -end diff --git a/spec/acceptance/tests/should_not_create_existing.rb b/spec/acceptance/tests/should_not_create_existing.rb deleted file mode 100644 index 31686bc..0000000 --- a/spec/acceptance/tests/should_not_create_existing.rb +++ /dev/null @@ -1,24 +0,0 @@ -test_name 'should not create host if it exists' - -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-not-create-existing') - - step 'set up the system for the test' - on agent, "printf '127.0.0.2 test alias\n' > #{file}" - - step 'tell puppet to ensure the host exists' - on(agent, puppet_resource('host', 'test', "target=#{file}", - 'ensure=present', 'ip=127.0.0.2', 'host_aliases=alias')) do - fail_test 'darn, we created the host record' if - stdout.include? '/Host[test1]/ensure: created' - end - - step 'clean up after we created things' - on agent, "rm -f #{file}" -end diff --git a/spec/acceptance/tests/should_query_all.rb b/spec/acceptance/tests/should_query_all.rb deleted file mode 100644 index cc92566..0000000 --- a/spec/acceptance/tests/should_query_all.rb +++ /dev/null @@ -1,34 +0,0 @@ -test_name 'should query all hosts from hosts file' - -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. - -content = '127.0.0.1 test1 test1.local -127.0.0.2 test2 test2.local -127.0.0.3 test3 test3.local -127.0.0.4 test4 test4.local -' - -agents.each do |agent| - backup = agent.tmpfile('host-query-all') - - step 'configure the system for testing (including file backups)' - on agent, "cp /etc/hosts #{backup}" - on agent, 'cat > /etc/hosts', stdin: content - - step 'query all host records using puppet' - on(agent, puppet_resource('host')) do - found = stdout.scan(%r{host \{ '([^']+)'}).flatten.sort - fail_test "the list of returned hosts was wrong: #{found.join(', ')}" unless - found == ['test1', 'test2', 'test3', 'test4'] - - count = stdout.scan(%r{ensure\s+=>\s+'present'}).length - fail_test "found #{count} records, wanted 4" unless count == 4 - end - - step 'clean up the system afterwards' - on agent, "cat #{backup} > /etc/hosts && rm -f #{backup}" -end diff --git a/spec/acceptance/tests/ticket_4131_should_not_create_without_ip.rb b/spec/acceptance/tests/ticket_4131_should_not_create_without_ip.rb deleted file mode 100644 index a26faee..0000000 --- a/spec/acceptance/tests/ticket_4131_should_not_create_without_ip.rb +++ /dev/null @@ -1,31 +0,0 @@ -test_name '#4131: should not create host without IP attribute' - -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('4131-require-ip') - - step 'configure the target system for the test' - on agent, "rm -rf #{file} ; touch #{file}" - - step 'try to create the host, which should fail' - # REVISIT: This step should properly need to handle the non-zero exit code, - # and #5668 has been filed to record that. When it is fixed this test will - # start to fail, and this comment will tell you why. --daniel 2010-12-24 - on(agent, puppet_resource('host', 'test', "target=#{file}", - 'host_aliases=alias')) do - unless agent['locale'] == 'ja' - fail_test "puppet didn't complain about the missing attribute" unless - stderr.include? 'ip is a required attribute for hosts' - end - end - - step 'verify that the host was not added to the file' - on(agent, "cat #{file} ; rm -f #{file}") do - fail_test 'the host was apparently added to the file' if stdout.include? 'test' - end -end diff --git a/spec/acceptance/tests/ticket_4131_should_not_create_without_ip_spec.rb b/spec/acceptance/tests/ticket_4131_should_not_create_without_ip_spec.rb new file mode 100644 index 0000000..a26faee --- /dev/null +++ b/spec/acceptance/tests/ticket_4131_should_not_create_without_ip_spec.rb @@ -0,0 +1,31 @@ +test_name '#4131: should not create host without IP attribute' + +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('4131-require-ip') + + step 'configure the target system for the test' + on agent, "rm -rf #{file} ; touch #{file}" + + step 'try to create the host, which should fail' + # REVISIT: This step should properly need to handle the non-zero exit code, + # and #5668 has been filed to record that. When it is fixed this test will + # start to fail, and this comment will tell you why. --daniel 2010-12-24 + on(agent, puppet_resource('host', 'test', "target=#{file}", + 'host_aliases=alias')) do + unless agent['locale'] == 'ja' + fail_test "puppet didn't complain about the missing attribute" unless + stderr.include? 'ip is a required attribute for hosts' + end + end + + step 'verify that the host was not added to the file' + on(agent, "cat #{file} ; rm -f #{file}") do + fail_test 'the host was apparently added to the file' if stdout.include? 'test' + end +end -- cgit v1.2.3