summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-12-03 21:34:29 -0800
committerJay Mundrawala <jdmundrawala@gmail.com>2015-12-03 21:40:16 -0800
commit2c8d90c0eea2b014aba1699c677d9d42c850746b (patch)
tree0c5abdfa453d9aaf6d1a7734fc89b055229f8b4f /spec/unit
parent3c18cd94ec153b73441ef3e3f4bd3c82a7f24587 (diff)
downloadchef-jdm/dsc_resource_timeout.tar.gz
Add timeout attribute to dsc_resourcejdm/dsc_resource_timeout
`dsc_resource` was missing a timeout resource. Some resources, such as `xSQLServerSetup` were taking longer than the default of 10 minuites set by mixlib-shellout. Fixes #4232
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/resource/dsc_resource_spec.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/unit/resource/dsc_resource_spec.rb b/spec/unit/resource/dsc_resource_spec.rb
index 6fa74a139f..276aa74111 100644
--- a/spec/unit/resource/dsc_resource_spec.rb
+++ b/spec/unit/resource/dsc_resource_spec.rb
@@ -21,6 +21,7 @@ describe Chef::Resource::DscResource do
let(:dsc_test_property_name) { :DSCTestProperty }
let(:dsc_test_property_value) { 'DSCTestValue' }
let(:dsc_test_reboot_action) { :reboot_now }
+ let(:dsc_test_timeout) { 101 }
context 'when Powershell supports Dsc' do
let(:dsc_test_run_context) {
@@ -57,6 +58,11 @@ describe Chef::Resource::DscResource do
expect(dsc_test_resource.reboot_action).to eq(dsc_test_reboot_action)
end
+ it "allows the timeout attribute to be set" do
+ dsc_test_resource.timeout(dsc_test_timeout)
+ expect(dsc_test_resource.timeout).to eq(dsc_test_timeout)
+ end
+
context "when setting a dsc property" do
it "allows setting a dsc property with a property name of type Symbol" do
dsc_test_resource.property(dsc_test_property_name, dsc_test_property_value)
@@ -87,4 +93,4 @@ describe Chef::Resource::DscResource do
end
end
end
-end \ No newline at end of file
+end