[Pkg-puppet-devel] [SCM] Packaging of Facter for debian branch, experimental_upstream, updated. 1.5.9-54-g5a4eeed
Nick Lewis
nick at puppetlabs.com
Wed Jun 22 08:51:55 UTC 2011
The following commit has been merged in the experimental_upstream branch:
commit 9404a7a3bb8da660e26897d052cdd03c291fb0bb
Author: Nick Lewis <nick at puppetlabs.com>
Date: Tue May 31 14:59:20 2011 -0700
(#7670) Add an acceptance test
This test runs only on Ubuntu machines and will reproduce the problem with these steps:
* load Facter
* request the operatingsystem fact
* clear Facter
* request the operatingsystem fact and verify it is still correct
Reviewed-By: Jacob Helwig <jacob at puppetlabs.com>
diff --git a/acceptance/tests/operatingsystem_detection_after_clear_on_ubuntu.rb b/acceptance/tests/operatingsystem_detection_after_clear_on_ubuntu.rb
new file mode 100644
index 0000000..3c7c4d9
--- /dev/null
+++ b/acceptance/tests/operatingsystem_detection_after_clear_on_ubuntu.rb
@@ -0,0 +1,18 @@
+test_name "#7670: Facter should properly detect operatingsystem on Ubuntu after a clear"
+
+script_contents = <<-OS_DETECT
+ require 'facter'
+ Facter['operatingsystem'].value
+ Facter.clear
+ exit Facter['operatingsystem'].value == 'Ubuntu'
+OS_DETECT
+
+script_name = "/tmp/facter_os_detection_test_#{$$}"
+
+agents.each do |agent|
+ next unless agent['platform'].include? 'ubuntu'
+
+ create_remote_file(agent, script_name, script_contents)
+
+ on(agent, "ruby #{script_name}")
+end
--
Packaging of Facter for debian
More information about the Pkg-puppet-devel
mailing list