diff options
author | Tim Smith <tsmith@chef.io> | 2020-04-13 10:14:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-13 10:14:02 -0700 |
commit | ca59043ff778f73bf462245ee9c7749f1a13c659 (patch) | |
tree | 49d2339c2abeb3fde2e3a65a9000ad1cec31f824 | |
parent | 584ae47eb49294510a3a2151ef2f2cbd5aff542a (diff) | |
parent | 240b98ec820f948ca41e06f9d1d457a629565e5f (diff) | |
download | chef-ca59043ff778f73bf462245ee9c7749f1a13c659.tar.gz |
Merge pull request #9299 from MsysTechnologiesllc/dh/MSYS-1225_remove_sles11_support
Remove support for SLES11 and update tests to just on openSUSE
-rw-r--r-- | .expeditor/verify.pipeline.yml | 4 | ||||
-rw-r--r-- | kitchen-tests/kitchen.yml | 1 | ||||
-rw-r--r-- | lib/chef/resource/sysctl.rb | 1 | ||||
-rw-r--r-- | omnibus/omnibus-test.sh | 2 | ||||
-rw-r--r-- | spec/functional/assets/inittest | 15 | ||||
-rw-r--r-- | spec/functional/resource/insserv_spec.rb | 2 | ||||
-rw-r--r-- | spec/spec_helper.rb | 2 | ||||
-rw-r--r-- | spec/support/platform_helpers.rb | 4 |
8 files changed, 17 insertions, 14 deletions
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 69b65ad155..d2389cde90 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -89,6 +89,7 @@ steps: - label: "Integration Specs openSUSE :ruby: 2.6" commands: - /workdir/scripts/bk_tests/bk_container_prep.sh + - zypper install -y cron insserv-compat - cd /workdir; bundle install --jobs=3 --retry=3 --path=vendor/bundle --without omnibus_package docgen - bundle exec rake spec:integration expeditor: @@ -100,7 +101,7 @@ steps: - label: "Functional Specs openSUSE :ruby: 2.6" commands: - /workdir/scripts/bk_tests/bk_container_prep.sh - - zypper install -y cronie + - zypper install -y cronie insserv-compat - cd /workdir; bundle install --jobs=3 --retry=3 --path=vendor/bundle --without omnibus_package docgen ruby_prof - bundle exec rake spec:functional expeditor: @@ -112,6 +113,7 @@ steps: - label: "Unit Specs openSUSE :ruby: 2.6" commands: - /workdir/scripts/bk_tests/bk_container_prep.sh + - zypper install -y cron insserv-compat - bundle install --jobs=3 --retry=3 --path=vendor/bundle --without omnibus_package docgen ruby_prof - bundle exec rake spec:unit - bundle exec rake component_specs diff --git a/kitchen-tests/kitchen.yml b/kitchen-tests/kitchen.yml index 8a8e749b84..b13b31125e 100644 --- a/kitchen-tests/kitchen.yml +++ b/kitchen-tests/kitchen.yml @@ -151,6 +151,7 @@ platforms: intermediate_instructions: - RUN /usr/bin/zypper --non-interactive update - RUN /usr/bin/zypper --non-interactive install cron + - RUN /usr/bin/zypper --non-interactive install insserv-compat suites: - name: end-to-end diff --git a/lib/chef/resource/sysctl.rb b/lib/chef/resource/sysctl.rb index 240f45e60f..82dbe61081 100644 --- a/lib/chef/resource/sysctl.rb +++ b/lib/chef/resource/sysctl.rb @@ -57,7 +57,6 @@ class Chef def after_created raise "The sysctl resource requires Linux as it needs sysctl and the sysctl.d directory functionality." unless node["os"] == "linux" - raise "The sysctl resource does not support SLES releases less than 12 as it requires a sysctl.d directory" if platform_family?("suse") && node["platform_version"].to_i < 12 end def coerce_value(v) diff --git a/omnibus/omnibus-test.sh b/omnibus/omnibus-test.sh index 0499d03b0b..2a3b6e520e 100644 --- a/omnibus/omnibus-test.sh +++ b/omnibus/omnibus-test.sh @@ -131,7 +131,7 @@ FORCE_FFI_YAJL=ext export FORCE_FFI_YAJL # chef-shell smoke tests require "rb-readline" which requires "infocmp" -# most platforms provide "infocmp" by default via an "ncurses" package but SLES 11 and 12 provide it via "ncurses-devel" which +# most platforms provide "infocmp" by default via an "ncurses" package but SLES 12 provide it via "ncurses-devel" which # isn't typically installed. omnibus-toolchain has "infocmp" built-in so we add omnibus-toolchain to the PATH to ensure # tests will function properly. PATH="/opt/$TOOLCHAIN/bin:/usr/local/bin:/opt/$TOOLCHAIN/embedded/bin:$PATH" diff --git a/spec/functional/assets/inittest b/spec/functional/assets/inittest index dc542a965a..3284d27a1e 100644 --- a/spec/functional/assets/inittest +++ b/spec/functional/assets/inittest @@ -2,16 +2,17 @@ TMPDIR="${TMPDIR:-/tmp}" -function create_chef_txt { - touch $TMPDIR/inittest.txt +create_chef_txt() { + touch "$TMPDIR"/inittest.txt } -function delete_chef_txt { - rm $TMPDIR/inittest.txt + +delete_chef_txt() { + rm "$TMPDIR"/inittest.txt } -function rename_chef_txt { - mv $TMPDIR/inittest.txt $TMPDIR/$1 +rename_chef_txt() { + mv "$TMPDIR"/inittest.txt "$TMPDIR"/"$1" } case "$1" in @@ -22,7 +23,7 @@ stop ) delete_chef_txt ;; status ) - [ -f $TMPDIR/inittest.txt ] || [ -f $TMPDIR/inittest_reload.txt ] || [ -f $TMPDIR/inittest_restart.txt ] + [ -f "$TMPDIR"/inittest.txt ] || [ -f "$TMPDIR"/inittest_reload.txt ] || [ -f "$TMPDIR"/inittest_restart.txt ] ;; reload ) rename_chef_txt "inittest_reload.txt" diff --git a/spec/functional/resource/insserv_spec.rb b/spec/functional/resource/insserv_spec.rb index 55a803d431..1af33b434b 100644 --- a/spec/functional/resource/insserv_spec.rb +++ b/spec/functional/resource/insserv_spec.rb @@ -22,7 +22,7 @@ require "functional/resource/base" require "chef/mixin/shell_out" require "fileutils" -describe Chef::Resource::Service, :requires_root, :sles11 do +describe Chef::Resource::Service, :requires_root, :opensuse do include Chef::Mixin::ShellOut diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 49e8d2f8f5..c6fd27d271 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -169,7 +169,7 @@ RSpec.configure do |config| config.filter_run_excluding linux_only: true unless linux? config.filter_run_excluding aix_only: true unless aix? config.filter_run_excluding suse_only: true unless suse? - config.filter_run_excluding sles11: true unless sles11? + config.filter_run_excluding opensuse: true unless opensuse? config.filter_run_excluding debian_family_only: true unless debian_family? config.filter_run_excluding supports_cloexec: true unless supports_cloexec? config.filter_run_excluding selinux_only: true unless selinux_enabled? diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb index e92da37043..0e98fce621 100644 --- a/spec/support/platform_helpers.rb +++ b/spec/support/platform_helpers.rb @@ -174,8 +174,8 @@ def rhel6? rhel? && !!(ohai[:platform_version].to_i == 6) end -def sles11? - suse? && !!(ohai[:platform_version].to_i == 11) +def opensuse? + suse? && !!(ohai[:platform_version].to_i >= 15) end def rhel7? |