diff options
author | Daniel Pittman <daniel@puppetlabs.com> | 2011-05-06 11:08:35 -0700 |
---|---|---|
committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-05-06 11:08:35 -0700 |
commit | f80afbe72b848fe4ed81d8116d4eeb494aa6f61e (patch) | |
tree | 73c7f27f2ea2fb1668f7067ce05638f5064f540d /acceptance | |
parent | 1b12b55b6a2d3581f9643bf09d55727ba1213580 (diff) | |
parent | b983386ece1b9816e6d3d59a316ad589e35773df (diff) | |
download | puppet-f80afbe72b848fe4ed81d8116d4eeb494aa6f61e.tar.gz puppet-f80afbe72b848fe4ed81d8116d4eeb494aa6f61e.tar.xz puppet-f80afbe72b848fe4ed81d8116d4eeb494aa6f61e.zip |
Merge branch '2.7.x' into 2.7.next
Conflicts:
* spec/unit/node/facts_spec.rb
Updates:
* spec/unit/interface/action{,_builder}_spec.rb
=> update for 'when_invoked' block being required.
Diffstat (limited to 'acceptance')
4 files changed, 51 insertions, 7 deletions
diff --git a/acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb b/acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb index d05735e50..792e88b46 100644 --- a/acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb +++ b/acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb @@ -41,3 +41,6 @@ agents.each { |agent| fail_test "Site.pp not detect at Master?" unless stdout.include? 'ticket_5477_notify' } + +step "Clean-up site.pp" +on master, "rm /etc/puppet/manifests/site.pp" diff --git a/acceptance/tests/ticket_6928_puppet_master_parse_fails.rb b/acceptance/tests/ticket_6928_puppet_master_parse_fails.rb index aac53138a..155e91d3f 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 diff --git a/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb b/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb new file mode 100644 index 000000000..76a6bf818 --- /dev/null +++ b/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb @@ -0,0 +1,33 @@ +test_name "#7117 Broke the environment criteria in auth.conf" + +# add to auth.conf +add_2_authconf = %q{ +path / +environment override +auth any +allow * +} + +step "Save original auth.conf file and create a temp auth.conf" +on master, "cp #{config['puppetpath']}/auth.conf /tmp/auth.conf-7117; echo '#{add_2_authconf}' > #{config['puppetpath']}/auth.conf" + +# Kill running Puppet Master -- should not be running at this point +step "Master: kill running Puppet Master" +on master, "ps -U puppet | awk '/puppet/ { print \$1 }' | xargs kill || echo \"Puppet Master not running\"" +step "Master: Start Puppet Master" +on master, puppet_master("--certdnsnames=\"puppet:$(hostname -s):$(hostname -f)\" --verbose --noop") + + +# Run test on Agents +step "Agent: agent --test" +on agents, puppet_agent("--test") + +step "Fetch agent facts from Puppet Master" +agents.each do |host| + on(host, "curl -k -H \"Accept: yaml\" https://#{master}:8140/override/facts/\`hostname -f\`") do + assert_match(/--- !ruby\/object:Puppet::Node::Facts/, stdout, "Agent Facts not returned for #{host}") + end +end + +step "Restore original auth.conf file" +on master, "cp -f /tmp/auth.conf-7117 #{config['puppetpath']}/auth.conf" diff --git a/acceptance/tests/ticket_7139_puppet_resource_file_qualified_paths.rm b/acceptance/tests/ticket_7139_puppet_resource_file_qualified_paths.rm new file mode 100644 index 000000000..f773ba17c --- /dev/null +++ b/acceptance/tests/ticket_7139_puppet_resource_file_qualified_paths.rm @@ -0,0 +1,11 @@ +test_name "#7139: Puppet resource file failes on path with leading '/'" + +step "Agents: create valid, invalid formatted manifests" +create_remote_file(agents, '/tmp/ticket-7139', %w{foo bar contents} ) + +step "Run puppet file resource on /tmp/ticket-7139" +agents.each do |host| + on(host, "puppet resource file /tmp/ticket-7139") do + assert_match(/file \{ \'\/tmp\/ticket-7139\':/, stdout, "puppet resource file failed on #{host}") + end +end |