diff options
author | Serdar Sutay <serdar@opscode.com> | 2014-10-30 10:53:28 -0700 |
---|---|---|
committer | Serdar Sutay <serdar@opscode.com> | 2014-10-30 10:53:28 -0700 |
commit | d3a2281b77bea82d90e58d8143ce6db068181a09 (patch) | |
tree | bba97c4fb61cfcef368264b9e99b360d2bb61b38 /spec/functional/event_loggers | |
parent | 2b6d395adad6f174902fe10e83c3a97318f3698e (diff) | |
parent | 7be911cbffb3f525d1c5afdd55eba82cfa2982b8 (diff) | |
download | chef-d3a2281b77bea82d90e58d8143ce6db068181a09.tar.gz |
Merge pull request #2313 from opscode/sersut/win-res-lookup-fix
Make sure windows_service and windows_package resources are found with the new dynamic provider resolver.
Diffstat (limited to 'spec/functional/event_loggers')
-rw-r--r-- | spec/functional/event_loggers/windows_eventlog_spec.rb | 10 |
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 |