summaryrefslogtreecommitdiff
path: root/spec/functional
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2014-10-16 15:43:58 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2014-10-22 13:03:30 -0700
commit7412b9721d853bc7afb78c5dc1f3d74441596dd1 (patch)
tree8c6bf6248cb6657f4486e556c57ae3cd2f3a9bf3 /spec/functional
parent7993d05ac6251b06093f282becf75be7a8a49bd0 (diff)
downloadchef-7412b9721d853bc7afb78c5dc1f3d74441596dd1.tar.gz
Use windows evt log by default on windows
Diffstat (limited to 'spec/functional')
-rw-r--r--spec/functional/event_loggers/windows_eventlog_spec.rb (renamed from spec/functional/logging/windows_eventlog_spec.rb)10
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/functional/logging/windows_eventlog_spec.rb b/spec/functional/event_loggers/windows_eventlog_spec.rb
index b86595e053..9da9f60fa9 100644
--- a/spec/functional/logging/windows_eventlog_spec.rb
+++ b/spec/functional/event_loggers/windows_eventlog_spec.rb
@@ -18,17 +18,17 @@
require 'spec_helper'
require 'securerandom'
-require 'chef/logging/windows_eventlog'
+require 'chef/event_loggers/windows_eventlog'
if Chef::Platform.windows?
require 'win32/eventlog'
include Win32
end
-describe Chef::Logging::WindowsEventLogger, :windows_only do
+describe Chef::EventLoggers::WindowsEventLogger, :windows_only do
let(:run_id) { SecureRandom.uuid }
let(:version) { SecureRandom.uuid }
let(:elapsed_time) { SecureRandom.random_number(100) }
- let(:logger) { Chef::Logging::WindowsEventLogger.new }
+ let(:logger) { Chef::EventLoggers::WindowsEventLogger.new }
let(:flags) { nil }
let(:node) { nil }
let(:run_status) { double('Run Status', {run_id: run_id, elapsed_time: elapsed_time }) }
@@ -36,6 +36,10 @@ describe Chef::Logging::WindowsEventLogger, :windows_only do
let!(:offset) { event_log.read_last_event.record_number }
let(:mock_exception) { double('Exception', {message: SecureRandom.uuid, backtrace:[SecureRandom.uuid, SecureRandom.uuid]})}
+ it 'is available' do
+ Chef::EventLoggers::WindowsEventLogger.available?.should be_true
+ end
+
it 'writes run_start event with event_id 10000 and contains version' do
logger.run_start(version)