summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-10-30 14:36:00 -0700
committerTim Smith <tsmith@chef.io>2018-10-30 14:36:00 -0700
commit8e4c8b69a330a87fecb77c16fa398fede25486cc (patch)
treedf35e76bce06c24409a77fd2a20687777c25cf26 /spec/support
parent9a5b3ddd83784686c529d801795cde538ac040c5 (diff)
downloadchef-8e4c8b69a330a87fecb77c16fa398fede25486cc.tar.gz
Fix testing / installing on SLES 15sles15_symlinks
Make sure we identify SLES 15 as suse for our zypper tests Make sure we don't remove the symlinks on SLES when doing an upgrade or the new release will be broken Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/platform_helpers.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb
index 6ae052ba1d..5ae9c01722 100644
--- a/spec/support/platform_helpers.rb
+++ b/spec/support/platform_helpers.rb
@@ -220,7 +220,8 @@ def selinux_enabled?
end
def suse?
- File.exists?("/etc/SuSE-release")
+ ::File.exists?("/etc/SuSE-release") ||
+ ( ::File.exists?("/etc/os-release") && /sles|suse/.match?(File.read("/etc/os-release")) )
end
def root?