summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-08-24 21:26:26 -0700
committerGitHub <noreply@github.com>2020-08-24 21:26:26 -0700
commitd1488659413f8ddf280827ce1420805cb1165038 (patch)
tree7063d3cf213a5972963982c7d3463528d680ee2b
parent437b472852e12e1334393bfe8948b3d6b7571e6c (diff)
parent8a46c4527eb015757070156eae11869ae00f2f6b (diff)
downloadchef-d1488659413f8ddf280827ce1420805cb1165038.tar.gz
Merge pull request #10332 from chef/bug_sir
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--.expeditor/release.omnibus.yml1
-rw-r--r--spec/functional/resource/user/dscl_spec.rb2
-rw-r--r--spec/functional/resource/user/mac_user_spec.rb2
-rw-r--r--spec/spec_helper.rb3
-rw-r--r--spec/support/platform_helpers.rb14
5 files changed, 10 insertions, 12 deletions
diff --git a/.expeditor/release.omnibus.yml b/.expeditor/release.omnibus.yml
index 9b455c3919..0d8a21dd3c 100644
--- a/.expeditor/release.omnibus.yml
+++ b/.expeditor/release.omnibus.yml
@@ -40,6 +40,7 @@ builder-to-testers-map:
- mac_os_x-10.13-x86_64
- mac_os_x-10.14-x86_64
- mac_os_x-10.15-x86_64
+ - mac_os_x-11.0-x86_64
sles-12-s390x:
- sles-12-s390x
sles-12-x86_64:
diff --git a/spec/functional/resource/user/dscl_spec.rb b/spec/functional/resource/user/dscl_spec.rb
index 462e4aaa0b..50da812b0f 100644
--- a/spec/functional/resource/user/dscl_spec.rb
+++ b/spec/functional/resource/user/dscl_spec.rb
@@ -19,7 +19,7 @@ require "spec_helper"
require "chef/mixin/shell_out"
metadata = {
- macos_only: true,
+ macos_1013: true,
requires_root: true,
}
diff --git a/spec/functional/resource/user/mac_user_spec.rb b/spec/functional/resource/user/mac_user_spec.rb
index f383140d0a..dabc303afb 100644
--- a/spec/functional/resource/user/mac_user_spec.rb
+++ b/spec/functional/resource/user/mac_user_spec.rb
@@ -19,7 +19,7 @@ require "spec_helper"
require "chef/mixin/shell_out"
metadata = {
- macos_1014: true,
+ macos_gte_1014: true,
requires_root: true,
}
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index f497350e97..5766af8954 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -143,7 +143,8 @@ RSpec.configure do |config|
config.filter_run_excluding not_supported_on_windows: true if windows?
config.filter_run_excluding not_supported_on_macos: true if macos?
config.filter_run_excluding macos_only: true unless macos?
- config.filter_run_excluding macos_1014: true unless macos_1014?
+ 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_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 6298e4440d..d4bd0701d8 100644
--- a/spec/support/platform_helpers.rb
+++ b/spec/support/platform_helpers.rb
@@ -3,7 +3,6 @@ require "chef/mixin/shell_out"
require "ohai/mixin/http_helper"
require "ohai/mixin/gce_metadata"
require "chef/mixin/powershell_out"
-require "chef/version_class"
class ShellHelpers
extend Chef::Mixin::ShellOut
@@ -95,13 +94,12 @@ def windows_user_right?(right)
Chef::ReservedNames::Win32::Security.get_account_right(ENV["USERNAME"]).include?(right)
end
-def macos_1014?
- if macos?
- ver = Chef::Version.new(ohai[:platform_version])
- return ver.major == 10 && ver.minor == 14
- end
+def macos_1013?
+ macos? && Gem::Requirement.new("~> 10.13.0").satisfied_by?(Gem::Version.new(ohai[:platform_version]))
+end
- false
+def macos_gte_1014?
+ macos? && Gem::Requirement.new(">= 10.14").satisfied_by?(Gem::Version.new(ohai[:platform_version]))
end
# detects if the hardware is 64-bit (evaluates to true in "WOW64" mode in a 32-bit app on a 64-bit system)
@@ -114,8 +112,6 @@ def windows32?
windows? && !windows64?
end
-# def jruby?
-
def unix?
!windows?
end