Please review pull request #667: Fix order dependent acceptance test on Windows opened by (joshcooper)
Description:
Previously, the test assumed that the agent already had a signed
certificate and would fail trying to connect to the master to retrieve a
catalog. But this didn't work if the agent didn't have a cert.
This commit changes the test to use a conf directory, whose parents
don't exist. As a result, puppet will immediately fail to start, but
report the error, including the path we specified. This way it's not
dependent on the SSL state, and it doesn't affect the SSL-ness of other
tests.
- Opened: Thu Apr 12 21:50:28 UTC 2012
- Based on: puppetlabs:2.7.x (192076538058f779ee8909680e9659c31b7623c6)
- Requested merge: joshcooper:maint/2.7.x/eventlog-order-dependent-test (d54100d44827ef2175e860df623e4ccfeb8aee9a)
Diff follows:
diff --git a/acceptance/tests/windows/eventlog.rb b/acceptance/tests/windows/eventlog.rb
index ab4f2a6..85f3bde 100644
--- a/acceptance/tests/windows/eventlog.rb
+++ b/acceptance/tests/windows/eventlog.rb
@@ -14,13 +14,16 @@ def get_cmd(host)
# get remote time
now = on(agent, "#{get_cmd(agent)} -e \"puts Time.now.utc.strftime('%m/%d/%Y %H:%M:%S')\"").stdout.chomp
+ # it should fail to start since parent directories don't exist
+ confdir = "/does/not/exist"
+
# generate an error, no master on windows boxes
- on agent, puppet_agent('--server', '127.0.0.1', '--test'), :acceptable_exit_codes => [1]
+ on agent, puppet_agent('--server', '127.0.0.1', '--test', '--confdir', confdir), :acceptable_exit_codes => [1]
# make sure there's a Puppet error message in the log
# cygwin + ssh + wmic hangs trying to read stdin, so echo '' |
on agent, "cmd /c echo '' | wmic ntevent where \"LogFile='Application' and SourceName='Puppet' and TimeWritten >= '#{now}'\" get Message,Type /format:csv" do
fail_test "Event not found in Application event log" unless
- stdout =~ /Could not retrieve catalog from remote server.*,Error/m
+ stdout =~ /Cannot create [a-z]:\/does\/not\/exist.*,Error/mi
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.
