diff options
author | Serdar Sutay <serdar@opscode.com> | 2014-10-20 11:12:47 -0700 |
---|---|---|
committer | Serdar Sutay <serdar@opscode.com> | 2014-10-20 11:12:47 -0700 |
commit | 9dd4a45353b4a350c69985e7f2f4458657cea087 (patch) | |
tree | 1a7ab22591d09b400cf6671ba6c837dde18a40e0 /spec/functional/resource | |
parent | 0c1bc0007734e3037f5509092dc7a9e71a39b1c5 (diff) | |
download | chef-9dd4a45353b4a350c69985e7f2f4458657cea087.tar.gz |
Fix cron specs on Solaris.
Diffstat (limited to 'spec/functional/resource')
-rw-r--r-- | spec/functional/resource/cron_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/functional/resource/cron_spec.rb b/spec/functional/resource/cron_spec.rb index 0a19fae0ed..287b5a1391 100644 --- a/spec/functional/resource/cron_spec.rb +++ b/spec/functional/resource/cron_spec.rb @@ -17,6 +17,7 @@ # limitations under the License. # +require 'spec_helper' require 'functional/resource/base' require 'chef/mixin/shell_out' @@ -55,7 +56,12 @@ describe Chef::Resource::Cron, :requires_root, :unix_only do let(:new_resource) do new_resource = Chef::Resource::Cron.new("Chef functional test cron", run_context) new_resource.user 'root' - new_resource.minute '@hourly' + # @hourly is not supported on solaris + if ohai[:platform] == "solaris" || ohai[:platform] == "solaris2" + new_resource.minute "0 * * * *" + else + new_resource.minute '@hourly' + end new_resource.hour '' new_resource.day '' new_resource.month '' |