[Pkg-puppet-devel] [SCM] Packaging of Facter for debian branch, upstream, updated. 3a39dd8353b6308cf49522990104cc63e55d7cda
Paul Nasrat
pnasrat at googlemail.com
Fri Jan 29 17:22:40 UTC 2010
The following commit has been merged in the upstream branch:
commit 9515a403b2a3350b3b6eb2c1578c5871e9588ac2
Author: Paul Nasrat <pnasrat at googlemail.com>
Date: Sun Aug 23 09:09:44 2009 -0500
Issue #2548 netblock fact
We already have a network fact it's just missing a test.
Paul
diff --git a/spec/unit/util/ip.rb b/spec/unit/util/ip.rb
index 60ec09e..e97b5df 100644
--- a/spec/unit/util/ip.rb
+++ b/spec/unit/util/ip.rb
@@ -70,6 +70,16 @@ describe Facter::Util::IP do
Facter::Util::IP.get_interface_value("e1000g0", "netmask").should == "255.255.255.0"
end
+ it "should return calculated network information for Solaris" do
+ sample_output_file = File.dirname(__FILE__) + "/../data/solaris_ifconfig_single_interface"
+ solaris_ifconfig_interface = File.new(sample_output_file).read()
+
+ Facter::Util::IP.stubs(:get_single_interface_output).with("e1000g0").returns(solaris_ifconfig_interface)
+ Facter.stubs(:value).with(:kernel).returns("SunOS")
+
+ Facter::Util::IP.get_network_value("e1000g0").should == "172.16.15.0"
+ end
+
it "should return interface information for FreeBSD supported via an alias" do
sample_output_file = File.dirname(__FILE__) + "/../data/6.0-STABLE_FreeBSD_ifconfig"
ifconfig_interface = File.new(sample_output_file).read()
--
Packaging of Facter for debian
More information about the Pkg-puppet-devel
mailing list