[Pkg-puppet-devel] [SCM] Packaging of Facter for debian branch, experimental_upstream, updated. 1.5.9-54-g5a4eeed
Adrien Thebo
adrien.thebo at gmail.com
Wed Jun 22 08:51:48 UTC 2011
The following commit has been merged in the experimental_upstream branch:
commit 7f3e89de2d9da14bc7bef33709b79f48434eec6a
Author: Adrien Thebo <adrien at puppetlabs.com>
Date: Tue Mar 22 12:40:16 2011 -0700
(#2714) Fixed faulty test
- Looks like some copy/paste added some linux tests that relied on
prtdiag, which isn't possible. Corrected them to check against
solaris.
diff --git a/spec/unit/virtual_spec.rb b/spec/unit/virtual_spec.rb
index ac0a9bb..d169192 100644
--- a/spec/unit/virtual_spec.rb
+++ b/spec/unit/virtual_spec.rb
@@ -121,8 +121,10 @@ describe "Virtual fact" do
Facter.fact(:virtual).value.should == "virtualbox"
end
+ end
+ describe "on Solaris" do
it "should be vmware with VMWare vendor name from prtdiag" do
- Facter.fact(:kernel).stubs(:value).returns("Linux")
+ Facter.fact(:kernel).stubs(:value).returns("SunOS")
Facter::Util::Resolution.stubs(:exec).with('lspci').returns(nil)
Facter::Util::Resolution.stubs(:exec).with('dmidecode').returns(nil)
Facter::Util::Resolution.stubs(:exec).with('prtdiag').returns("System Configuration: VMware, Inc. VMware Virtual Platform")
@@ -130,7 +132,7 @@ describe "Virtual fact" do
end
it "should be parallels with Parallels vendor name from prtdiag" do
- Facter.fact(:kernel).stubs(:value).returns("Linux")
+ Facter.fact(:kernel).stubs(:value).returns("SunOS")
Facter::Util::Resolution.stubs(:exec).with('lspci').returns(nil)
Facter::Util::Resolution.stubs(:exec).with('dmidecode').returns(nil)
Facter::Util::Resolution.stubs(:exec).with('prtdiag').returns("System Configuration: Parallels Virtual Platform")
@@ -138,7 +140,7 @@ describe "Virtual fact" do
end
it "should be virtualbox with VirtualBox vendor name from prtdiag" do
- Facter.fact(:kernel).stubs(:value).returns("Linux")
+ Facter.fact(:kernel).stubs(:value).returns("SunOS")
Facter::Util::Resolution.stubs(:exec).with('lspci').returns(nil)
Facter::Util::Resolution.stubs(:exec).with('dmidecode').returns(nil)
Facter::Util::Resolution.stubs(:exec).with('prtdiag').returns("System Configuration: innotek GmbH VirtualBox")
--
Packaging of Facter for debian
More information about the Pkg-puppet-devel
mailing list