summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvasu1105 <vasundhara.jagdale@msystechnologies.com>2018-04-18 11:35:29 +0530
committervasu1105 <vasundhara.jagdale@msystechnologies.com>2018-04-24 11:32:31 +0530
commitdc291ae8b3cad3aa40d07c30ef496adf7b30da86 (patch)
treee94011ae90a42bf56805144ca3354e21c1bb4370
parentb1057105c4516142fea328c9043d80dea29b1b14 (diff)
downloadchef-dc291ae8b3cad3aa40d07c30ef496adf7b30da86.tar.gz
Fix for failing functional spec on adhoc buildbtm/MSYS-752_build
Signed-off-by: vasu1105 <vasundhara.jagdale@msystechnologies.com>
-rw-r--r--lib/chef/resource/windows_task.rb8
-rw-r--r--spec/functional/resource/windows_task_spec.rb2
2 files changed, 2 insertions, 8 deletions
diff --git a/lib/chef/resource/windows_task.rb b/lib/chef/resource/windows_task.rb
index 38f651d670..ec376c9578 100644
--- a/lib/chef/resource/windows_task.rb
+++ b/lib/chef/resource/windows_task.rb
@@ -80,13 +80,7 @@ class Chef
execution_time_limit(sec_to_min(execution_time_limit))
end
- # Removed the default value :hourly for frequency in Chef 14 following code added for backward compatibility
- chef_version = ::Chef::VERSION.split(".")
- if chef_version[0].to_i > 13 || (chef_version[0].to_i >= 0)
- validate_frequency(frequency) if action.include?(:create) || action.include?(:change)
- else
- frequency(:hourly) if frequency.nil?
- end
+ validate_frequency(frequency) if action.include?(:create) || action.include?(:change)
validate_start_time(start_time, frequency)
validate_start_day(start_day, frequency) if start_day
validate_user_and_password(user, password)
diff --git a/spec/functional/resource/windows_task_spec.rb b/spec/functional/resource/windows_task_spec.rb
index 70f3e6d92e..621802bd44 100644
--- a/spec/functional/resource/windows_task_spec.rb
+++ b/spec/functional/resource/windows_task_spec.rb
@@ -1355,7 +1355,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
subject.run_action(:create)
subject.run_action(:run)
current_resource = call_for_load_current_resource
- expect(current_resource.task.status).to eq("queued").or eq("running") # queued or can be running
+ expect(current_resource.task.status).to eq("queued").or eq("running").or eq("ready") # queued or can be running
end
end