Please review pull request #711: (maint) Fix acceptance tests for Windows opened by (jeffweiss)
Description:
Change acceptance tests to resolve issues around newlines not being properly matched with Windows and linux.
Mark topscope acceptance test as win32 pending.
Signed-off-by: Jeff Weiss [email protected]
- Opened: Wed Apr 25 07:04:21 UTC 2012
- Based on: puppetlabs:master (32f91d11e149bfad7b38639d3aa2aea1e8176cd8)
- Requested merge: jeffweiss:maint/master/fix_acceptance_tests_for_windows (56d6dec9793349cbc69e94741e621e2bdf904a9c)
Diff follows:
diff --git a/acceptance/tests/language/node_overrides_topscope_when_using_enc.rb b/acceptance/tests/language/node_overrides_topscope_when_using_enc.rb
index 28c99a0..fa063ce 100644
--- a/acceptance/tests/language/node_overrides_topscope_when_using_enc.rb
+++ b/acceptance/tests/language/node_overrides_topscope_when_using_enc.rb
@@ -57,6 +57,10 @@ class a {
with_master_running_on(master, "--config #{testdir}/puppet.conf --debug --verbose --daemonize --dns_alt_names=\"puppet,$(hostname -s),$(hostname -f)\" --autosign true") do
agents.each do |agent|
+ if agent['platform'].include?('windows')
+ Log.warn("Pending: this does not currently work on Windows")
+ next
+ end
run_agent_on(agent, "--no-daemonize --onetime --verbose --server #{master}")
assert_match("top_scope overridden in agent node.", stdout)
diff --git a/acceptance/tests/pluginsync/7316_apps_should_be_available_via_pluginsync.rb b/acceptance/tests/pluginsync/7316_apps_should_be_available_via_pluginsync.rb
index 3624ac8..b3f3930 100644
--- a/acceptance/tests/pluginsync/7316_apps_should_be_available_via_pluginsync.rb
+++ b/acceptance/tests/pluginsync/7316_apps_should_be_available_via_pluginsync.rb
@@ -200,7 +200,7 @@ def main()
step "verify that the application shows up in help" do
agents.each do |agent|
on(agent, PuppetCommand.new(:help, "--libdir=\"#{get_test_file_path(agent, agent_lib_dir)}\"")) do
- assert_match(/^\s+#{app_name}\s+#{app_desc % mode}$/, result.stdout)
+ assert_match(/^\s+#{app_name}\s+#{app_desc % mode}/, result.stdout)
end
end
end
@@ -208,7 +208,7 @@ def main()
step "verify that we can run the application" do
agents.each do |agent|
on(agent, PuppetCommand.new(:"#{app_name}", "--libdir=\"#{get_test_file_path(agent, agent_lib_dir)}\"")) do
- assert_match(/^#{app_output % mode}$/, result.stdout)
+ assert_match(/^#{app_output % mode}/, result.stdout)
end
end
end
diff --git a/acceptance/tests/pluginsync/7316_faces_with_app_stubs_should_be_available_via_pluginsync.rb b/acceptance/tests/pluginsync/7316_faces_with_app_stubs_should_be_available_via_pluginsync.rb
index 5b559b3..1862736 100644
--- a/acceptance/tests/pluginsync/7316_faces_with_app_stubs_should_be_available_via_pluginsync.rb
+++ b/acceptance/tests/pluginsync/7316_faces_with_app_stubs_should_be_available_via_pluginsync.rb
@@ -223,7 +223,7 @@ class Puppet::Application::#{app_name.capitalize} < Puppet::Application::FaceBas
step "verify that the application shows up in help" do
agents.each do |agent|
on(agent, PuppetCommand.new(:help, "--libdir=\"#{get_test_file_path(agent, agent_lib_dir)}\"")) do
- assert_match(/^\s+#{app_name}\s+#{app_desc % "face"}$/, result.stdout)
+ assert_match(/^\s+#{app_name}\s+#{app_desc % "face"}/, result.stdout)
end
end
end
@@ -231,7 +231,7 @@ class Puppet::Application::#{app_name.capitalize} < Puppet::Application::FaceBas
step "verify that we can run the application" do
agents.each do |agent|
on(agent, PuppetCommand.new(:"#{app_name}", "--libdir=\"#{get_test_file_path(agent, agent_lib_dir)}\"")) do
- assert_match(/^#{app_output % "face"}$/, result.stdout)
+ assert_match(/^#{app_output % "face"}/, result.stdout)
end
end
end
diff --git a/acceptance/tests/ticket_3172_puppet_kick_with_hostnames_on_the_command_line.rb b/acceptance/tests/ticket_3172_puppet_kick_with_hostnames_on_the_command_line.rb
index 0605dd3..2dbbb3e 100644
--- a/acceptance/tests/ticket_3172_puppet_kick_with_hostnames_on_the_command_line.rb
+++ b/acceptance/tests/ticket_3172_puppet_kick_with_hostnames_on_the_command_line.rb
@@ -5,7 +5,7 @@
agents.each do |host|
if host['platform'].include?('windows')
on(host, puppet_kick(target), :acceptable_exit_codes => [1]) {
- assert_match(/Puppet kick is not supported/, stderr)
+ assert_match(/Puppet kick is not supported/, stdout)
}
else
on(host, puppet_kick(target), :acceptable_exit_codes => [3]) {
diff --git a/acceptance/tests/ticket_4233_resource_with_a_newline.rb b/acceptance/tests/ticket_4233_resource_with_a_newline.rb
index 1ed1ce8..61da2f7 100644
--- a/acceptance/tests/ticket_4233_resource_with_a_newline.rb
+++ b/acceptance/tests/ticket_4233_resource_with_a_newline.rb
@@ -12,6 +12,6 @@
agents.each do |host|
resource = host.echo('-e "\nHello World\n"')
apply_manifest_on(host, "exec { '#{resource}': }") do
- assert_no_match(/err:/, stdout, "error report in output on #{host}")
+ assert_match(/notice:.*Hello World.*success/, stdout)
end
end
-- 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.
