[Pkg-puppet-devel] [facter] 45/61: Maint: Clear memory facts now that they are loaded earlier

Stig Sandbeck Mathisen ssm at debian.org
Mon Nov 4 15:02:02 UTC 2013


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository facter.

commit 4e12130e7c8eb21306c3078527346546811160a1
Author: Josh Cooper <josh at puppetlabs.com>
Date:   Wed Jul 31 17:31:56 2013 -0700

    Maint: Clear memory facts now that they are loaded earlier
    
    The previous commit moved the preloading of memory related facts to the
    outermost describe block. When the inner describe block tried to preload
    the swapencrypted fact, it would fail on non-Darwin systems, because the
    stubs where never evaluated.
    
    This commit clears the facts in the inner describe block as is done for
    every other platform.
---
 spec/unit/memory_spec.rb |    1 +
 1 file changed, 1 insertion(+)

diff --git a/spec/unit/memory_spec.rb b/spec/unit/memory_spec.rb
index e79f8d3..2de005e 100755
--- a/spec/unit/memory_spec.rb
+++ b/spec/unit/memory_spec.rb
@@ -46,6 +46,7 @@ describe "Memory facts" do
 
   describe "on Darwin" do
     before(:each) do
+      Facter.clear
       Facter.fact(:kernel).stubs(:value).returns("Darwin")
       Facter::Util::Resolution.stubs(:exec).with('sysctl -n hw.memsize').returns('8589934592')
       sample_vm_stat = <<VMSTAT

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git



More information about the Pkg-puppet-devel mailing list