summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authordheerajd-msys <dheeraj.dubey@msystechnologies.com>2020-04-14 18:29:17 +0530
committerdheerajd-msys <dheeraj.dubey@msystechnologies.com>2020-04-14 18:35:05 +0530
commit936025c20767cc6cd4ecd439b77bb21c2adbbec4 (patch)
tree18aad7f78657072fbfc39ff0e2a007a750a172d1 /spec
parenta439c4ac79391f0aab602fd394f99cbb70e2815d (diff)
downloadchef-936025c20767cc6cd4ecd439b77bb21c2adbbec4.tar.gz
add timeout property
Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/functional/resource/msu_package_spec.rb2
-rw-r--r--spec/unit/resource/msu_package_spec.rb4
2 files changed, 6 insertions, 0 deletions
diff --git a/spec/functional/resource/msu_package_spec.rb b/spec/functional/resource/msu_package_spec.rb
index c49fe9499d..1161049571 100644
--- a/spec/functional/resource/msu_package_spec.rb
+++ b/spec/functional/resource/msu_package_spec.rb
@@ -24,6 +24,7 @@ describe Chef::Resource::MsuPackage, :win2012r2_only do
let(:package_name) { "Package_for_KB2959977" }
let(:package_source) { "https://download.microsoft.com/download/3/B/3/3B320C07-B7B1-41E5-81F4-79EBC02DF7D3/Windows8.1-KB2959977-x64.msu" }
let(:package_identity) { "Package_for_KB2959977~31bf3856ad364e35~amd64~~6.3.1.1" }
+ let(:timeout) { 3600 }
let(:new_resource) { Chef::Resource::CabPackage.new("windows_test_pkg") }
let(:cab_provider) do
@@ -37,6 +38,7 @@ describe Chef::Resource::MsuPackage, :win2012r2_only do
new_resource = Chef::Resource::MsuPackage.new("test msu package", run_context)
new_resource.package_name package_name
new_resource.source package_source
+ new_resource.timeout timeout
new_resource
end
diff --git a/spec/unit/resource/msu_package_spec.rb b/spec/unit/resource/msu_package_spec.rb
index 49fe61b7b9..3c7462a1a7 100644
--- a/spec/unit/resource/msu_package_spec.rb
+++ b/spec/unit/resource/msu_package_spec.rb
@@ -60,4 +60,8 @@ describe Chef::Resource::MsuPackage do
resource.source("package.msu")
expect(resource.source).not_to eq("package.msu")
end
+
+ it "sets timeout property to 3600 by default" do
+ expect(resource.timeout).to eql(3600)
+ end
end