diff options
author | Jeremiah Snapp <jeremiah@chef.io> | 2022-01-01 08:49:43 -0500 |
---|---|---|
committer | Jeremiah Snapp <jeremiah@chef.io> | 2022-01-01 08:49:43 -0500 |
commit | be0cd548f3c559481e80e05a584fb32b642cd220 (patch) | |
tree | 9420e0ec716e05f16d1378ff972ef3c918b44460 | |
parent | a8e4195f03cf23832095f646307b8a15cf0a8777 (diff) | |
download | chef-jsnapp/skip-tests-on-freebsd-gte-12.3.tar.gz |
Skip tests on FreeBSD >= 12.3jsnapp/skip-tests-on-freebsd-gte-12.3
Somehow the shared examples linked below puts rspec into
a state that causes 12 group_spec.rb tests to fail on FreeBSD >= 12.3.
These tests were not failing on FreeBSD <= 12.2.
We have not been able to find a way to fix the tests.
https://github.com/chef/chef/blob/v17.9.19/spec/support/shared/functional/securable_resource_with_reporting.rb#L115-L142
Signed-off-by: Jeremiah Snapp <jeremiah@chef.io>
-rw-r--r-- | knife/spec/support/platform_helpers.rb | 4 | ||||
-rw-r--r-- | spec/functional/resource/group_spec.rb | 4 | ||||
-rw-r--r-- | spec/spec_helper.rb | 1 | ||||
-rw-r--r-- | spec/support/platform_helpers.rb | 4 |
4 files changed, 11 insertions, 2 deletions
diff --git a/knife/spec/support/platform_helpers.rb b/knife/spec/support/platform_helpers.rb index a3fb95e069..c6d14281f8 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 60b608e4ff..6cabab3614 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 1538a4eb34..e256c7355c 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 |