Please review pull request #491: Fix a few acceptance tests that were checking stderr opened by (cprice-puppet)

Description:

We recently made a change that tried to fix places where we had been
writing output directly to stdout/stderr rather than using the
Puppet::Util::Logging framework. There were a few acceptance tests
that were not updated properly in accordance with this change; this
should fix "ticket_8740_should_not_enumerate_root_directory.rb" and
"should_not_reassign.rb".

  • Opened: Mon Feb 13 18:26:35 UTC 2012
  • Based on: puppetlabs:master (5bb758bb3035f40c436887c89ac64138a7162ad7)
  • Requested merge: cprice-puppet:bugs/master/fix_stderr_acceptance_tests (68e1bbbce28be5b713f83947cf92b14f99b4bfa6)

Diff follows:

diff --git a/acceptance/tests/apply/hashes/should_not_reassign.rb b/acceptance/tests/apply/hashes/should_not_reassign.rb
index 2b0f9cc..dd8fc1c 100755
--- a/acceptance/tests/apply/hashes/should_not_reassign.rb
+++ b/acceptance/tests/apply/hashes/should_not_reassign.rb
@@ -6,5 +6,5 @@
 
 apply_manifest_on(agents, manifest, :acceptable_exit_codes => [1]) do
     fail_test "didn't find the failure" unless
-        stderr.include? "Assigning to the hash 'my_hash' with an existing key 'one'"
+        stdout.include? "Assigning to the hash 'my_hash' with an existing key 'one'"
 end
diff --git a/acceptance/tests/resource/file/ticket_8740_should_not_enumerate_root_directory.rb b/acceptance/tests/resource/file/ticket_8740_should_not_enumerate_root_directory.rb
index 5763a3c..52befa5 100644
--- a/acceptance/tests/resource/file/ticket_8740_should_not_enumerate_root_directory.rb
+++ b/acceptance/tests/resource/file/ticket_8740_should_not_enumerate_root_directory.rb
@@ -10,7 +10,7 @@
 
 step "query for all files, which should return nothing"
 on(agents, puppet_resource('file'), :acceptable_exit_codes => [1]) do
-  assert_match(%r{Listing all file instances is not supported.  Please specify a file or directory, e.g. puppet resource file /etc}, stderr)
+  assert_match(%r{Listing all file instances is not supported.  Please specify a file or directory, e.g. puppet resource file /etc}, stdout)
 end
 
 ["/", "/etc"].each do |file|

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to