spec/unit/plugins/linux/platform_spec.rb in ohai-6.18.0.rc.1 vs spec/unit/plugins/linux/platform_spec.rb in ohai-6.18.0.rc.3
- old
+ new
@@ -382,15 +382,16 @@
describe "with lsb_release results" do
before(:each) do
@ohai[:lsb][:id] = "SUSE LINUX"
end
- it "should read the platform as opensuse on openSUSE" do
+ it "should read the platform as suse" do
@ohai[:lsb][:release] = "12.1"
File.should_receive(:read).with("/etc/SuSE-release").and_return("openSUSE 12.1 (x86_64)\nVERSION = 12.1\nCODENAME = Asparagus\n")
@ohai._require_plugin("linux::platform")
- @ohai[:platform].should == "opensuse"
+ @ohai[:platform].should == "suse"
+ @ohai[:platform_version].should == "12.1"
@ohai[:platform_family].should == "suse"
end
end
describe "without lsb_release results" do
@@ -426,31 +427,27 @@
end
it "[OHAI-272] should read the version as 11.3" do
File.should_receive(:read).with("/etc/SuSE-release").and_return("openSUSE 11.3 (x86_64)\nVERSION = 11.3")
@ohai._require_plugin("linux::platform")
+ @ohai[:platform].should == "suse"
@ohai[:platform_version].should == "11.3"
@ohai[:platform_family].should == "suse"
end
it "[OHAI-272] should read the version as 9.1" do
File.should_receive(:read).with("/etc/SuSE-release").and_return("SuSE Linux 9.1 (i586)\nVERSION = 9.1")
@ohai._require_plugin("linux::platform")
+ @ohai[:platform].should == "suse"
@ohai[:platform_version].should == "9.1"
@ohai[:platform_family].should == "suse"
end
it "[OHAI-272] should read the version as 11.4" do
File.should_receive(:read).with("/etc/SuSE-release").and_return("openSUSE 11.4 (i586)\nVERSION = 11.4\nCODENAME = Celadon")
@ohai._require_plugin("linux::platform")
+ @ohai[:platform].should == "suse"
@ohai[:platform_version].should == "11.4"
- @ohai[:platform_family].should == "suse"
- end
-
- it "should read the platform as opensuse on openSUSE" do
- File.should_receive(:read).with("/etc/SuSE-release").and_return("openSUSE 12.2 (x86_64)\nVERSION = 12.2\nCODENAME = Mantis\n")
- @ohai._require_plugin("linux::platform")
- @ohai[:platform].should == "opensuse"
@ohai[:platform_family].should == "suse"
end
end
end