[Pkg-puppet-devel] [facter] 54/180: (maint) Ensure specs don't generate flattened ec2 facts

Stig Sandbeck Mathisen ssm at debian.org
Mon Jun 30 15:06:30 UTC 2014


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

ssm pushed a commit to branch master
in repository facter.

commit a417998966928c55dd0ed104608b7ac4311c3a62
Author: Adrien Thebo <git at somethingsinistral.net>
Date:   Wed Apr 16 17:23:25 2014 -0700

    (maint) Ensure specs don't generate flattened ec2 facts
---
 spec/unit/ec2_spec.rb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/spec/unit/ec2_spec.rb b/spec/unit/ec2_spec.rb
index 109c970..28ad20a 100755
--- a/spec/unit/ec2_spec.rb
+++ b/spec/unit/ec2_spec.rb
@@ -6,9 +6,11 @@ describe "ec2_metadata" do
 
   before do
     Facter::EC2::Metadata.stubs(:new).returns querier
-    Facter.collection.internal_loader.load(:ec2)
+
     # Prevent flattened facts from forcing evaluation of the ec2 metadata fact
     Facter.stubs(:value).with(:ec2_metadata)
+    Facter.collection.internal_loader.load(:ec2)
+    Facter.unstub(:value)
   end
 
   subject { Facter.fact(:ec2_metadata).resolution(:rest) }
@@ -54,7 +56,11 @@ describe "ec2_userdata" do
 
   before do
     Facter::EC2::Userdata.stubs(:new).returns querier
+
+    # Prevent flattened facts from forcing evaluation of the ec2 metadata fact
+    Facter.stubs(:value).with(:ec2_metadata)
     Facter.collection.internal_loader.load(:ec2)
+    Facter.unstub(:value)
   end
 
   subject { Facter.fact(:ec2_userdata).resolution(:rest) }

-- 
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