diff options
author | Tim Smith <tsmith@chef.io> | 2021-04-02 14:35:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-02 14:35:47 -0700 |
commit | 8a7b170205c9e3237ee663210b88af23eddb7324 (patch) | |
tree | fc96bd6be295ad34f2ffd689f8151491128efd3a | |
parent | 6ff48706a96ee10abcf0a5d52bcd4cd2ee10c652 (diff) | |
parent | ad03bdc56f4ac297e1e6a0fafa626b967f007fea (diff) | |
download | chef-8a7b170205c9e3237ee663210b88af23eddb7324.tar.gz |
Merge pull request #11293 from chef/cron_16
Skip the cron integration tests on macOS 11+
-rw-r--r-- | spec/functional/resource/cron_spec.rb | 2 | ||||
-rw-r--r-- | spec/spec_helper.rb | 1 | ||||
-rw-r--r-- | spec/support/platform_helpers.rb | 4 |
3 files changed, 6 insertions, 1 deletions
diff --git a/spec/functional/resource/cron_spec.rb b/spec/functional/resource/cron_spec.rb index fa53eb08a1..e247dc53cd 100644 --- a/spec/functional/resource/cron_spec.rb +++ b/spec/functional/resource/cron_spec.rb @@ -19,7 +19,7 @@ require "spec_helper" require "chef/mixin/shell_out" -describe Chef::Resource::Cron, :requires_root, :unix_only do +describe Chef::Resource::Cron, :requires_root, :unix_only, :not_macos_gte_11 do include Chef::Mixin::ShellOut diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 52f17788bb..620d21a3ee 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -145,6 +145,7 @@ RSpec.configure do |config| config.filter_run_excluding macos_only: true unless macos? config.filter_run_excluding macos_1013: true unless macos_1013? config.filter_run_excluding macos_gte_1014: true unless macos_gte_1014? + config.filter_run_excluding not_macos_gte_11: true unless macos_gte_11? config.filter_run_excluding not_supported_on_aix: true if aix? config.filter_run_excluding not_supported_on_solaris: true if solaris? config.filter_run_excluding not_supported_on_gce: true if gce? diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb index b29c860f30..0beea829fd 100644 --- a/spec/support/platform_helpers.rb +++ b/spec/support/platform_helpers.rb @@ -122,6 +122,10 @@ def macos? RUBY_PLATFORM.include?("darwin") end +def macos_gte_11? + macos? && !!(ohai[:platform_version].to_i >= 11) +end + def solaris? RUBY_PLATFORM.include?("solaris") end |