diff options
author | Salim Alam <salam@chef.io> | 2015-12-18 12:03:14 -0800 |
---|---|---|
committer | Salim Alam <salam@chef.io> | 2015-12-18 12:03:14 -0800 |
commit | e41ae9e7f407e8fa139bb154813805b46c0b5d1f (patch) | |
tree | 5016140670e4892d81bb9752f84d4e78e00530ef /spec | |
parent | 3cf41280da4f4fe4a3c92258e6891718ce4f489b (diff) | |
parent | 158733be398c91d4003258c9a0b4ea890c467971 (diff) | |
download | chef-e41ae9e7f407e8fa139bb154813805b46c0b5d1f.tar.gz |
Merge pull request #4330 from chef/shain/disable_aix_mount_tests
Disabled mount tests on AIX
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/functional/resource/aix_service_spec.rb | 4 | ||||
-rw-r--r-- | spec/functional/resource/mount_spec.rb | 3 | ||||
-rw-r--r-- | spec/spec_helper.rb | 1 | ||||
-rw-r--r-- | spec/support/platform_helpers.rb | 4 |
4 files changed, 9 insertions, 3 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/functional/resource/mount_spec.rb b/spec/functional/resource/mount_spec.rb index 002a927c96..cb3fa453b9 100644 --- a/spec/functional/resource/mount_spec.rb +++ b/spec/functional/resource/mount_spec.rb @@ -21,7 +21,7 @@ require 'chef/mixin/shell_out' require 'tmpdir' # run this test only for following platforms. -include_flag = !(['ubuntu', 'centos', 'aix', 'solaris2'].include?(ohai[:platform])) +include_flag = !(['ubuntu', 'centos', 'solaris2'].include?(ohai[:platform])) describe Chef::Resource::Mount, :requires_root, :skip_travis, :external => include_flag do # Disabled in travis because it refuses to let us mount a ramdisk. /dev/ramX does not @@ -34,6 +34,7 @@ describe Chef::Resource::Mount, :requires_root, :skip_travis, :external => inclu def setup_device_for_mount # use ramdisk for creating a test device for mount. # This can cleaner if we have chef resource/provider for ramdisk. + # TODO: These tests only work in LPARs, not WPARs on AIX. case ohai[:platform] when "aix" ramdisk = shell_out!("mkramdisk 16M").stdout 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 |