[Pkg-puppet-devel] [SCM] Packaging of Facter for debian branch, experimental, updated. debian/1.5.8-2-160-gb26a2a8

Dominic Maraglia dmaraglia at gmail.com
Tue May 10 08:40:10 UTC 2011


The following commit has been merged in the experimental branch:
commit 69f98dad7969801f8b573bb120a5e0a6ea528176
Author: Dominic Maraglia <dmaraglia at gmail.com>
Date:   Thu Apr 21 10:39:30 2011 -0700

    Add facter test for ticket 7039

diff --git a/accecptance/tests/ticket_7039_facter_multiple_facts_one_file.rb b/accecptance/tests/ticket_7039_facter_multiple_facts_one_file.rb
new file mode 100644
index 0000000..fb78628
--- /dev/null
+++ b/accecptance/tests/ticket_7039_facter_multiple_facts_one_file.rb
@@ -0,0 +1,31 @@
+test_name "#7039: Facter having issue handling multiple facts in a single file"
+
+fact_file= %q{
+Facter.add(:test_fact1) do
+    setcode do
+        "test fact 1"
+    end
+end
+
+Facter.add(:test_fact2) do
+    setcode do
+        "test fact 2"
+    end
+end
+}
+
+agent1=agents.first
+step "Agent: Create fact file with multiple facts"
+create_remote_file(agent1, '/tmp/test_facts.rb', fact_file )
+
+step "Agent: Verify test_fact1 from /tmp/test_facts.rb"
+on(agent1, "export FACTERLIB=/tmp && facter --puppet test_fact1") do
+    fail_test "Fact 1 not returned by facter --puppet test_fact1" unless
+      stdout.include? 'test fact 1'
+end
+
+step "Agent: Verify test_fact2 from /tmp/test_facts.rb"
+on(agent1, "export FACTERLIB=/tmp && facter --puppet test_fact2") do
+    fail_test "Fact 1 not returned by facter --puppet test_fact2" unless
+      stdout.include? 'test fact 2'
+end

-- 
Packaging of Facter for debian



More information about the Pkg-puppet-devel mailing list