summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Waldt <waldt@b1-systems.de>2018-02-26 18:03:18 +0100
committerEike Waldt <waldt@b1-systems.de>2018-03-01 18:03:13 +0100
commit46f576571a33a0856deaf357a20fd33b1b190522 (patch)
tree37c4f454cdbafc41a3b5eeba37c1df3bf4b60cdd
parentd3ec0d0e4f903e04204962d1cd3a2f154b553ee0 (diff)
downloadohai-46f576571a33a0856deaf357a20fd33b1b190522.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 efe2884e..6b6b4aee 100644
--- a/spec/unit/plugins/linux/platform_spec.rb
+++ b/spec/unit/plugins/linux/platform_spec.rb
@@ -686,6 +686,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