Skip to content

Commit f476f17

Browse files
author
Kylo Ginsberg
committed
Merge pull request #3919 from joshcooper/ticket/stable/PUP-4436-eventlog-redo
(PUP-4436) Generate error message in eventlog differently
2 parents e3d4a73 + 7e3025d commit f476f17

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

acceptance/tests/windows/eventlog.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@
1212
# get remote time
1313
now = on(agent, "#{ruby_command(agent)} -e \"puts Time.now.utc.strftime('%m/%d/%Y %H:%M:%S')\"").stdout.chomp
1414

15-
# it should fail to start since parent directories don't exist
16-
confdir = "/does/not/exist"
17-
1815
# generate an error, no master on windows boxes
19-
on agent, puppet_agent('--server', '127.0.0.1', '--test', '--confdir', confdir), :acceptable_exit_codes => [1]
16+
# we use `agent` because it creates an eventlog log destination by default,
17+
# whereas `apply` does not.
18+
on agent, puppet('agent', '--server', '127.0.0.1', '--test'), :acceptable_exit_codes => [1]
2019

2120
# make sure there's a Puppet error message in the log
2221
# cygwin + ssh + wmic hangs trying to read stdin, so echo '' |
2322
on agent, "cmd /c echo '' | wmic ntevent where \"LogFile='Application' and SourceName='Puppet' and TimeWritten >= '#{now}'\" get Message,Type /format:csv" do
2423
fail_test "Event not found in Application event log" unless
25-
stdout =~ /Cannot create [a-z]:\/does\/not\/exist.*,Error/mi
24+
stdout =~ /Could not retrieve catalog.*skipping run,Error/mi
2625
end
2726
end

0 commit comments

Comments
 (0)