diff options
author | Tim Smith <tsmith84@gmail.com> | 2019-12-02 10:40:23 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2019-12-02 10:40:23 -0800 |
commit | 7c040c5b3229523e9983aa07c182ea6182a5a032 (patch) | |
tree | ea8348633375f58c3e9fc37d66ce008fbb7ce899 | |
parent | 3287c8d49c79e4068872f1c359e4cab6dec8e221 (diff) | |
download | chef-7c040c5b3229523e9983aa07c182ea6182a5a032.tar.gz |
Remove some outdated spec filters
These don't matter anymore to ud
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | spec/functional/resource/cron_spec.rb | 6 | ||||
-rw-r--r-- | spec/functional/resource/ifconfig_spec.rb | 4 | ||||
-rw-r--r-- | spec/functional/resource/mount_spec.rb | 6 | ||||
-rw-r--r-- | spec/spec_helper.rb | 21 |
4 files changed, 13 insertions, 24 deletions
diff --git a/spec/functional/resource/cron_spec.rb b/spec/functional/resource/cron_spec.rb index 84fe304585..f616b84ce9 100644 --- a/spec/functional/resource/cron_spec.rb +++ b/spec/functional/resource/cron_spec.rb @@ -28,7 +28,7 @@ describe Chef::Resource::Cron, :requires_root, :unix_only do # Platform specific validation routines. def cron_should_exists(cron_name, command) case ohai[:platform] - when "aix", "solaris", "opensolaris", "solaris2", "omnios" + when "aix", "opensolaris", "solaris2", "omnios" expect(shell_out("crontab -l #{new_resource.user} | grep \"#{cron_name}\"").exitstatus).to eq(0) expect(shell_out("crontab -l #{new_resource.user} | grep \"#{cron_name}\"").stdout.lines.to_a.size).to eq(1) expect(shell_out("crontab -l #{new_resource.user} | grep \"#{command}\"").exitstatus).to eq(0) @@ -43,7 +43,7 @@ describe Chef::Resource::Cron, :requires_root, :unix_only do def cron_should_not_exists(cron_name) case ohai[:platform] - when "aix", "solaris", "opensolaris", "solaris2", "omnios" + when "aix", "opensolaris", "solaris2", "omnios" expect(shell_out("crontab -l #{new_resource.user} | grep \"#{cron_name}\"").exitstatus).to eq(1) expect(shell_out("crontab -l #{new_resource.user} | grep \"#{new_resource.command}\"").stdout.lines.to_a.size).to eq(0) else @@ -57,7 +57,7 @@ describe Chef::Resource::Cron, :requires_root, :unix_only do new_resource = Chef::Resource::Cron.new("Chef functional test cron", run_context) new_resource.user "root" # @hourly is not supported on solaris, aix - if ohai[:platform] == "solaris" || ohai[:platform] == "solaris2" || ohai[:platform] == "aix" + if ohai[:platform] == "solaris2" || ohai[:platform] == "aix" new_resource.minute "0 * * * *" else new_resource.minute "@hourly" diff --git a/spec/functional/resource/ifconfig_spec.rb b/spec/functional/resource/ifconfig_spec.rb index c52a4c0694..a88384e47d 100644 --- a/spec/functional/resource/ifconfig_spec.rb +++ b/spec/functional/resource/ifconfig_spec.rb @@ -23,9 +23,7 @@ require "chef/mixin/shell_out" # run this test only for following platforms. include_flag = !(%w{amazon debian aix}.include?(ohai[:platform_family]) || (ohai[:platform_family] == "rhel" && ohai[:platform_version].to_i < 7)) -describe Chef::Resource::Ifconfig, :requires_root, :skip_travis, external: include_flag do - # This test does not work in travis because there is no eth0 - +describe Chef::Resource::Ifconfig, :requires_root, external: include_flag do include Chef::Mixin::ShellOut let(:new_resource) do diff --git a/spec/functional/resource/mount_spec.rb b/spec/functional/resource/mount_spec.rb index f6c7f91bcd..7af61915b2 100644 --- a/spec/functional/resource/mount_spec.rb +++ b/spec/functional/resource/mount_spec.rb @@ -24,14 +24,10 @@ require "tmpdir" # run this test only for following platforms. include_flag = !(%w{debian rhel amazon aix solaris2}.include?(ohai[:platform_family])) -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 - # exist even after loading the kernel module - +describe Chef::Resource::Mount, :requires_root, external: include_flag do include Chef::Mixin::ShellOut # Platform specific setup, cleanup and validation helpers. - 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. diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b52c7d171d..c7672fe930 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -52,7 +52,7 @@ require "chef/knife" Dir["lib/chef/knife/**/*.rb"] .map { |f| f.gsub("lib/", "") } - .map { |f| f.gsub(%r{\.rb$}, "") } + .map { |f| f.gsub(/\.rb$/, "") } .each { |f| require f } require "chef/resource_resolver" @@ -93,7 +93,7 @@ require "spec/support/shared/unit/mock_shellout" Dir["spec/support/**/*.rb"] .reject { |f| f =~ %r{^spec/support/platforms} } .reject { |f| f =~ %r{^spec/support/pedant} } - .map { |f| f.gsub(%r{.rb$}, "") } + .map { |f| f.gsub(/.rb$/, "") } .map { |f| f.gsub(%r{spec/}, "") } .each { |f| require f } @@ -140,19 +140,18 @@ RSpec.configure do |config| config.filter_run_excluding skip_appveyor: true if ENV["APPVEYOR"] config.filter_run_excluding appveyor_only: true unless ENV["APPVEYOR"] - config.filter_run_excluding skip_travis: true if ENV["TRAVIS"] config.filter_run_excluding skip_buildkite: true if ENV["BUILDKITE"] config.filter_run_excluding windows_only: true unless windows? + config.filter_run_excluding not_supported_on_windows: true if windows? config.filter_run_excluding not_supported_on_mac_osx: true if mac_osx? - config.filter_run_excluding mac_osx_only: true if !mac_osx? + config.filter_run_excluding mac_osx_only: true unless mac_osx? 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? config.filter_run_excluding not_supported_on_nano: true if windows_nano_server? config.filter_run_excluding win2012r2_only: true unless windows_2012r2? - config.filter_run_excluding windows_2008r2_or_later: true unless windows_2008r2_or_later? config.filter_run_excluding windows64_only: true unless windows64? config.filter_run_excluding windows32_only: true unless windows32? config.filter_run_excluding windows_nano_only: true unless windows_nano_server? @@ -161,7 +160,7 @@ RSpec.configure do |config| config.filter_run_excluding ruby64_only: true unless ruby_64bit? config.filter_run_excluding ruby32_only: true unless ruby_32bit? config.filter_run_excluding windows_powershell_dsc_only: true unless windows_powershell_dsc? - config.filter_run_excluding windows_powershell_no_dsc_only: true unless ! windows_powershell_dsc? + config.filter_run_excluding windows_powershell_no_dsc_only: true if windows_powershell_dsc? config.filter_run_excluding windows_domain_joined_only: true unless windows_domain_joined? config.filter_run_excluding windows_not_domain_joined_only: true if windows_domain_joined? # We think this line was causing rspec tests to not run on the Jenkins windows @@ -189,7 +188,6 @@ RSpec.configure do |config| config.filter_run_excluding not_wpar: true unless wpar? config.filter_run_excluding not_supported_under_fips: true if fips? config.filter_run_excluding rhel: true unless rhel? - config.filter_run_excluding rhel5: true unless rhel5? config.filter_run_excluding rhel6: true unless rhel6? config.filter_run_excluding rhel7: true unless rhel7? config.filter_run_excluding rhel8: true unless rhel8? @@ -316,14 +314,11 @@ require "thread" module WEBrick module Utils class TimeoutHandler - def initialize - end + def initialize; end - def register(*args) - end + def register(*args); end - def cancel(*args) - end + def cancel(*args); end end end end |