[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Dominic Maraglia dmaraglia at gmail.com
Tue May 10 08:18:10 UTC 2011


The following commit has been merged in the experimental branch:
commit 349bd96c0fd59f8c7c1a83b7d40000d703136a87
Author: Dominic Maraglia <dmaraglia at gmail.com>
Date:   Mon Apr 25 11:14:04 2011 -0700

    Fix test ticket_6928_puppet_master_parse_fails
    
    Output for error conditions changed causing a regex to fail

diff --git a/acceptance/tests/ticket_6928_puppet_master_parse_fails.rb b/acceptance/tests/ticket_6928_puppet_master_parse_fails.rb
index aac5313..155e91d 100644
--- a/acceptance/tests/ticket_6928_puppet_master_parse_fails.rb
+++ b/acceptance/tests/ticket_6928_puppet_master_parse_fails.rb
@@ -7,8 +7,7 @@ create_remote_file(master, '/tmp/bad.pp', 'notify{bad:')
 
 step "Master: use --parseonly on an invalid manifest, should return 1 and issue deprecation warning"
 on master, puppet_master( %w{--parseonly /tmp/bad.pp} ), :acceptable_exit_codes => [ 1 ]
-  fail_test "Deprecation warning not issued for --parseonly" unless
-    stdout.include? '--parseonly has been removed. Please use \'puppet parser validate <manifest>\''
+  assert_match(/--parseonly has been removed. Please use \'puppet parser validate <manifest>\'/, stdout, "Deprecation warning not issued for --parseonly on #{master}" )
 
 step "Agents: create valid, invalid formatted manifests"
 agents.each do |host|
@@ -19,8 +18,7 @@ end
 step "Agents: use --parseonly on an invalid manifest, should return 1 and issue deprecation warning"
 agents.each do |host|
   on(host, "puppet --parseonly /tmp/bad.pp}", :acceptable_exit_codes => [ 1 ]) do
-    fail_test "Deprecation warning not issued for --parseonly" unless
-      stdout.include? '--parseonly has been removed. Please use \'puppet parser validate <manifest>\''
+    assert_match(/--parseonly has been removed. Please use \'puppet parser validate <manifest>\'/, stdout, "Deprecation warning not issued for --parseonly on #{host}" )
   end
 end
 
@@ -29,10 +27,9 @@ agents.each do |host|
   on(host, "puppet parser validate /tmp/good.pp", :acceptable_exit_codes => [ 0 ])
 end
 
-step "Test Face for ‘parser validate’ with bad manifest -- should fail"
+step "Test Faces for ‘parser validate’ with bad manifest -- should fail"
 agents.each do |host|
   on(host, "puppet parser validate /tmp/bad.pp", :acceptable_exit_codes => [ 1 ]) do
-    fail_test "Bad manifest detection failed" unless
-      stderr.include? 'Could not run: Could not parse for environment production'
+    assert_match(/err: Could not parse for environment production/, stdout, "Bad manifest detection failed on #{host}" )
   end
 end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list