summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCrae <john.mccrae@progress.com>2022-07-21 10:41:53 +0600
committerGitHub <noreply@github.com>2022-07-21 10:41:53 +0600
commitf199c63f3fbc2d18bc60d9b413418f782d42ffe1 (patch)
treeceb92d21fcbbdb2d66b33cb2cefde2bd6471d92f
parentf10d569a2c0a68a7693fe518345188321cb7cb5e (diff)
parent57dad53481670a34f7a1ea004386044494f35f41 (diff)
downloadchef-f199c63f3fbc2d18bc60d9b413418f782d42ffe1.tar.gz
Merge pull request #13079 from chef/IPACK-248-permission-denied-error-on-free-bsd-boxes
-rw-r--r--knife/spec/support/platform_helpers.rb4
-rw-r--r--spec/functional/resource/group_spec.rb4
-rw-r--r--spec/spec_helper.rb1
-rw-r--r--spec/support/platform_helpers.rb4
4 files changed, 11 insertions, 2 deletions
diff --git a/knife/spec/support/platform_helpers.rb b/knife/spec/support/platform_helpers.rb
index 4d3acbcb33..1f36a0fbcc 100644
--- a/knife/spec/support/platform_helpers.rb
+++ b/knife/spec/support/platform_helpers.rb
@@ -127,6 +127,10 @@ def freebsd?
RUBY_PLATFORM.include?("freebsd")
end
+def freebsd_gte_12_3?
+ RUBY_PLATFORM.include?("freebsd") && !!(ohai[:platform_version].to_f >= 12.3)
+end
+
def intel_64bit?
!!(ohai[:kernel][:machine] == "x86_64")
end
diff --git a/spec/functional/resource/group_spec.rb b/spec/functional/resource/group_spec.rb
index 87953455b9..9360020537 100644
--- a/spec/functional/resource/group_spec.rb
+++ b/spec/functional/resource/group_spec.rb
@@ -425,7 +425,7 @@ describe Chef::Resource::Group, :requires_root_or_running_windows do
end
end
- describe "when there is a group" do
+ describe "when there is a group", :not_supported_on_freebsd_gte_12_3 do
it_behaves_like "correct group management"
end
@@ -463,7 +463,7 @@ describe Chef::Resource::Group, :requires_root_or_running_windows do
end
end
- describe "when there is a group" do
+ describe "when there is a group", :not_supported_on_freebsd_gte_12_3 do
it_behaves_like "correct group management"
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 2aa3b2a1cd..bbf52b95fd 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -144,6 +144,7 @@ RSpec.configure do |config|
config.filter_run_excluding macos_only: true unless macos?
config.filter_run_excluding not_macos_gte_11: true if macos_gte_11?
config.filter_run_excluding not_supported_on_aix: true if aix?
+ config.filter_run_excluding not_supported_on_freebsd_gte_12_3: true if freebsd_gte_12_3?
config.filter_run_excluding not_supported_on_solaris: true if solaris?
config.filter_run_excluding not_supported_on_gce: true if gce?
config.filter_run_excluding win2012r2_only: true unless windows_2012r2?
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb
index 430d9b055f..6ed0945286 100644
--- a/spec/support/platform_helpers.rb
+++ b/spec/support/platform_helpers.rb
@@ -127,6 +127,10 @@ def freebsd?
RUBY_PLATFORM.include?("freebsd")
end
+def freebsd_gte_12_3?
+ RUBY_PLATFORM.include?("freebsd") && !!(ohai[:platform_version].to_f >= 12.3)
+end
+
def intel_64bit?
!!(ohai[:kernel][:machine] == "x86_64")
end