[Pkg-puppet-devel] [facter] 01/61: (#21533) Verify facter doesn't write to stderr

Stig Sandbeck Mathisen ssm at debian.org
Mon Nov 4 15:01:34 UTC 2013


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository facter.

commit 9be738fbfd7accfa1946e24518b41fde29ce01dc
Author: Josh Cooper <josh at puppetlabs.com>
Date:   Mon Jul 1 15:47:45 2013 -0700

    (#21533) Verify facter doesn't write to stderr
    
    This commit doesn't fix #21533, but it adds an acceptance test to detect
    if executing `facter` writes to stdout.
---
 acceptance/tests/no_errors_on_stderr.rb |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/acceptance/tests/no_errors_on_stderr.rb b/acceptance/tests/no_errors_on_stderr.rb
new file mode 100644
index 0000000..d9ae599
--- /dev/null
+++ b/acceptance/tests/no_errors_on_stderr.rb
@@ -0,0 +1,6 @@
+test_name "Running facter should not output anything to stderr"
+
+on(hosts, facter) do |result|
+  fail_test "Hostname fact is missing" unless stdout =~ /hostname\s*=>\s*\S*/
+  fail_test "Facter should not have written to stderr: #{stderr}" unless stderr == ""
+end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git



More information about the Pkg-puppet-devel mailing list