summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Hain <shain@chef.io>2015-12-18 11:22:45 -0800
committerScott Hain <shain@chef.io>2015-12-18 11:22:45 -0800
commit158733be398c91d4003258c9a0b4ea890c467971 (patch)
tree31048bff4be196cef7e72d0f5e8212b9d738f767
parentf7320388ddba27693304d268fa8cc30c7d4a2cb2 (diff)
downloadchef-shain/disable_aix_mount_tests.tar.gz
Filter out service test that cannot run inside a WPARshain/disable_aix_mount_tests
-rwxr-xr-xspec/functional/resource/aix_service_spec.rb4
-rw-r--r--spec/spec_helper.rb1
-rw-r--r--spec/support/platform_helpers.rb4
3 files changed, 7 insertions, 2 deletions
diff --git a/spec/functional/resource/aix_service_spec.rb b/spec/functional/resource/aix_service_spec.rb
index 9dec87db93..604c04dad7 100755
--- a/spec/functional/resource/aix_service_spec.rb
+++ b/spec/functional/resource/aix_service_spec.rb
@@ -108,8 +108,8 @@ describe Chef::Resource::Service, :requires_root, :aix_only do
it_behaves_like "src service"
end
-
- describe "When service is a group" do
+ # Cannot run this test on a WPAR
+ describe "When service is a group", :not_wpar do
before(:all) do
script_dir = File.join(File.dirname(__FILE__), "/../assets/")
shell_out!("mkssys -s ctestsys -p #{script_dir}/testchefsubsys -u #{get_user_id} -S -n 15 -f 9 -R -Q -G ctestgrp")
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index de6bcb1ce7..deedffed91 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -164,6 +164,7 @@ RSpec.configure do |config|
config.filter_run_excluding :openssl_lt_101 => true unless openssl_lt_101?
config.filter_run_excluding :aes_256_gcm_only => true unless aes_256_gcm?
config.filter_run_excluding :broken => true
+ config.filter_run_excluding :not_wpar => true unless wpar?
running_platform_arch = `uname -m`.strip unless windows?
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb
index 3698091e1b..e80df90499 100644
--- a/spec/support/platform_helpers.rb
+++ b/spec/support/platform_helpers.rb
@@ -151,6 +151,10 @@ def aix?
!!(RUBY_PLATFORM =~ /aix/)
end
+def wpar?
+ !((ohai[:virtualization] || {})[:wpar_no].nil?)
+end
+
def supports_cloexec?
Fcntl.const_defined?('F_SETFD') && Fcntl.const_defined?('FD_CLOEXEC')
end