[Pkg-puppet-devel] [SCM] Packaging of Facter for debian branch, experimental_upstream, updated. 1.5.9-54-g5a4eeed

James Turnbull james at lovedthanlost.net
Wed Jun 22 08:51:49 UTC 2011


The following commit has been merged in the experimental_upstream branch:
commit 7441b32f9e062f9ca73c9d452f0559aa866e0277
Author: James Turnbull <james at lovedthanlost.net>
Date:   Wed Apr 6 03:04:02 2011 +1000

    Partial fix for #6971 - Fix for virtual tests

diff --git a/spec/unit/virtual_spec.rb b/spec/unit/virtual_spec.rb
index d169192..f69c898 100644
--- a/spec/unit/virtual_spec.rb
+++ b/spec/unit/virtual_spec.rb
@@ -73,6 +73,7 @@ describe "Virtual fact" do
 
       before do
         FileTest.expects(:exists?).with("/usr/lib/vmware/bin/vmware-vmx").returns false
+        Facter.fact(:operatingsystem).stubs(:value).returns(true)
         Facter.fact(:architecture).stubs(:value).returns(true)
       end
 
@@ -127,7 +128,7 @@ describe "Virtual fact" do
           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")
+          Facter::Util::Resolution.stubs(:exec).with('prtdiag', '/bin/sh').returns("System Configuration: VMware, Inc. VMware Virtual Platform")
           Facter.fact(:virtual).value.should == "vmware"
       end
 
@@ -135,7 +136,7 @@ describe "Virtual fact" do
           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")
+          Facter::Util::Resolution.stubs(:exec).with('prtdiag', '/bin/sh').returns("System Configuration: Parallels Virtual Platform")
           Facter.fact(:virtual).value.should == "parallels"
       end
 
@@ -143,7 +144,7 @@ describe "Virtual fact" do
           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")
+          Facter::Util::Resolution.stubs(:exec).with('prtdiag', '/bin/sh').returns("System Configuration: innotek GmbH VirtualBox")
           Facter.fact(:virtual).value.should == "virtualbox"
       end
   end

-- 
Packaging of Facter for debian



More information about the Pkg-puppet-devel mailing list