diff options
-rw-r--r-- | lib/chef/event_loggers/windows_eventlog.rb | 2 | ||||
-rw-r--r-- | lib/chef/log/winevt.rb | 2 | ||||
-rw-r--r-- | spec/functional/event_loggers/windows_eventlog_spec.rb | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/chef/event_loggers/windows_eventlog.rb b/lib/chef/event_loggers/windows_eventlog.rb index 3ace9e6f44..eecf0f033b 100644 --- a/lib/chef/event_loggers/windows_eventlog.rb +++ b/lib/chef/event_loggers/windows_eventlog.rb @@ -36,7 +36,7 @@ class Chef LOG_CATEGORY_ID = 11001 # Since we must install the event logger, this is not really configurable - SOURCE = "#{Chef::Dist::PRODUCT}".freeze + SOURCE = Chef::Dist::SHORT.freeze def self.available? ChefUtils.windows? diff --git a/lib/chef/log/winevt.rb b/lib/chef/log/winevt.rb index dcc13a77e4..be72f94dba 100644 --- a/lib/chef/log/winevt.rb +++ b/lib/chef/log/winevt.rb @@ -37,7 +37,7 @@ class Chef FATAL_EVENT_ID = 10104 # Since we must install the event logger, this is not really configurable - SOURCE = Chef::Dist::PRODUCT.freeze + SOURCE = Chef::Dist::SHORT.freeze include Chef::Mixin::Unformatter diff --git a/spec/functional/event_loggers/windows_eventlog_spec.rb b/spec/functional/event_loggers/windows_eventlog_spec.rb index d6c4c481f3..5d66386b36 100644 --- a/spec/functional/event_loggers/windows_eventlog_spec.rb +++ b/spec/functional/event_loggers/windows_eventlog_spec.rb @@ -49,7 +49,7 @@ describe Chef::EventLoggers::WindowsEventLogger, :windows_only do logger.run_start(version, run_status) expect(event_log.read(flags, offset).any? do |e| - e.source == Chef::Dist::PRODUCT && e.event_id == 10000 && + e.source == Chef::Dist::SHORT && e.event_id == 10000 && e.string_inserts[0].include?(version) end ).to be_truthy end @@ -58,7 +58,7 @@ describe Chef::EventLoggers::WindowsEventLogger, :windows_only do logger.run_started(run_status) expect(event_log.read(flags, offset).any? do |e| - e.source == Chef::Dist::PRODUCT && e.event_id == 10001 && + e.source == Chef::Dist::SHORT && e.event_id == 10001 && e.string_inserts[0].include?(run_id) end ).to be_truthy end @@ -68,7 +68,7 @@ describe Chef::EventLoggers::WindowsEventLogger, :windows_only do logger.run_completed(node) expect(event_log.read(flags, offset).any? do |e| - e.source == Chef::Dist::PRODUCT && e.event_id == 10002 && + e.source == Chef::Dist::SHORT && e.event_id == 10002 && e.string_inserts[0].include?(run_id) && e.string_inserts[1].include?(elapsed_time.to_s) end).to be_truthy @@ -79,7 +79,7 @@ describe Chef::EventLoggers::WindowsEventLogger, :windows_only do logger.run_failed(mock_exception) expect(event_log.read(flags, offset).any? do |e| - e.source == Chef::Dist::PRODUCT && e.event_id == 10003 && + e.source == Chef::Dist::SHORT && e.event_id == 10003 && e.string_inserts[0].include?(run_id) && e.string_inserts[1].include?(elapsed_time.to_s) && e.string_inserts[2].include?(mock_exception.class.name) && @@ -93,7 +93,7 @@ describe Chef::EventLoggers::WindowsEventLogger, :windows_only do logger.run_failed(mock_exception) expect(event_log.read(flags, offset).any? do |e| - e.source == Chef::Dist::PRODUCT && e.event_id == 10003 && + e.source == Chef::Dist::SHORT && e.event_id == 10003 && e.string_inserts[0].include?("UNKNOWN") && e.string_inserts[1].include?("UNKNOWN") && e.string_inserts[2].include?(mock_exception.class.name) && |