summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Waldt <waldt@b1-systems.de>2018-02-26 18:03:18 +0100
committerTim Smith <tsmith@chef.io>2018-10-30 09:47:28 -0700
commit7b9f465e60e2074085013594c0c63724e74fd3b6 (patch)
tree626648d9a1f9a1d660b9a0d438463de0fea68599
parent8f34b271f595ab6b0de5287a60109e6133e45d99 (diff)
downloadohai-7b9f465e60e2074085013594c0c63724e74fd3b6.tar.gz
os-release example for SLES 15
-rw-r--r--spec/unit/plugins/linux/platform_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/plugins/linux/platform_spec.rb b/spec/unit/plugins/linux/platform_spec.rb
index e3cdcdf0..d4ea91ad 100644
--- a/spec/unit/plugins/linux/platform_spec.rb
+++ b/spec/unit/plugins/linux/platform_spec.rb
@@ -702,6 +702,17 @@ CISCO_RELEASE
describe "on suse" do
+ describe "with os-release results" do
+ let(:have_suse_release) { false }
+ it "should read the platform as sles on SLES 15" do
+ expect(File).to receive(:read).with("/etc/os-release"). and_return("VERSION=\"15\"\nVERSION_ID=\"15\"\nPRETTY_NAME=\"SUSE Linux Enterprise Server 15\"\nID=\"sles\"\nID_LIKE=\"suse\"\nANSI_COLOR=\"0;32\"\nCPE_NAME=\"cpe:/o:suse:sles:15\"\n")
+ @plugin.run
+ expect(@plugin[:platform_family]).to eq("suse")
+ expect(@plugin[:platform]).to eq("sles")
+ expect(@plugin[:platform_version]).to eq("15")
+ end
+ end
+
let(:have_suse_release) { true }
describe "with lsb_release results" do