Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions acceptance/tests/windows/eventlog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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