summaryrefslogtreecommitdiff
path: root/spec/functional
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-10-28 13:30:30 -0700
committerSerdar Sutay <serdar@opscode.com>2014-10-28 18:37:31 -0700
commit7801d0e68b2a6e64001151cf47d5395e3aff5adb (patch)
tree1e46309fd6c4932b9e144f5fb7904adb1d2a57ae /spec/functional
parent8cefc070070c23dc1824beb2bd8551dc88014635 (diff)
downloadchef-7801d0e68b2a6e64001151cf47d5395e3aff5adb.tar.gz
Make sure the event log related capability is turned off on Windows 2003 boxes since it's not supported.
Diffstat (limited to 'spec/functional')
-rw-r--r--spec/functional/event_loggers/windows_eventlog_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/functional/event_loggers/windows_eventlog_spec.rb b/spec/functional/event_loggers/windows_eventlog_spec.rb
index 9da9f60fa9..c50bc7e00f 100644
--- a/spec/functional/event_loggers/windows_eventlog_spec.rb
+++ b/spec/functional/event_loggers/windows_eventlog_spec.rb
@@ -19,12 +19,12 @@
require 'spec_helper'
require 'securerandom'
require 'chef/event_loggers/windows_eventlog'
-if Chef::Platform.windows?
+if Chef::Platform.windows? and not Chef::Platform::windows_server_2003?
require 'win32/eventlog'
include Win32
end
-describe Chef::EventLoggers::WindowsEventLogger, :windows_only do
+describe Chef::EventLoggers::WindowsEventLogger, :windows_only, :not_supported_on_win2k3 do
let(:run_id) { SecureRandom.uuid }
let(:version) { SecureRandom.uuid }
let(:elapsed_time) { SecureRandom.random_number(100) }
@@ -43,14 +43,14 @@ describe Chef::EventLoggers::WindowsEventLogger, :windows_only do
it 'writes run_start event with event_id 10000 and contains version' do
logger.run_start(version)
- expect(event_log.read(flags, offset).any? { |e| e.source == 'Chef' && e.event_id == 10000 &&
+ expect(event_log.read(flags, offset).any? { |e| e.source == 'Chef' && e.event_id == 10000 &&
e.string_inserts[0].include?(version)}).to be_true
end
it 'writes run_started event with event_id 10001 and contains the run_id' do
logger.run_started(run_status)
- expect(event_log.read(flags, offset).any? { |e| e.source == 'Chef' && e.event_id == 10001 &&
+ expect(event_log.read(flags, offset).any? { |e| e.source == 'Chef' && e.event_id == 10001 &&
e.string_inserts[0].include?(run_id)}).to be_true
end
@@ -58,7 +58,7 @@ describe Chef::EventLoggers::WindowsEventLogger, :windows_only do
logger.run_started(run_status)
logger.run_completed(node)
- expect(event_log.read(flags, offset).any? { |e| e.source == 'Chef' && e.event_id == 10002 &&
+ expect(event_log.read(flags, offset).any? { |e| e.source == 'Chef' && e.event_id == 10002 &&
e.string_inserts[0].include?(run_id) &&
e.string_inserts[1].include?(elapsed_time.to_s)
}).to be_true