We already have a network fact it's just missing a test. Paul
Signed-off-by: Paul Nasrat <[email protected]> --- spec/unit/util/ip.rb | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) 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() -- 1.6.1.3 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---
