summaryrefslogtreecommitdiffstats
path: root/spec/unit/util
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2011-03-08 20:18:30 +1100
committerJames Turnbull <james@lovedthanlost.net>2011-03-17 07:56:07 +1100
commit0411d2eacbfad9d07977dea8975b604b7cdd1aa5 (patch)
tree30c79a3b1a623a7bff5f8e68ec0c99d69d4bcc71 /spec/unit/util
parent5b6f4fa4aae419bd2d65e1af6e185123dd432ac6 (diff)
downloadfacter-0411d2eacbfad9d07977dea8975b604b7cdd1aa5.tar.gz
facter-0411d2eacbfad9d07977dea8975b604b7cdd1aa5.tar.xz
facter-0411d2eacbfad9d07977dea8975b604b7cdd1aa5.zip
Fixed #2346 - Part 1: Added arp fact for Linux
Added facts arp (like the ipaddress etc) facts Added facts arp_interfacename
Diffstat (limited to 'spec/unit/util')
-rwxr-xr-xspec/unit/util/ip_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/util/ip_spec.rb b/spec/unit/util/ip_spec.rb
index 1a545b8..0374e75 100755
--- a/spec/unit/util/ip_spec.rb
+++ b/spec/unit/util/ip_spec.rb
@@ -227,4 +227,11 @@ describe Facter::Util::IP do
Facter::Util::IP.convert_from_hex?(platform).should == true
end
end
+
+ it "should return an arp address on Linux" do
+ Facter.stubs(:value).with(:kernel).returns("Linux")
+
+ Facter::Util::IP.expects(:get_arp_value).with("eth0").returns("00:00:0c:9f:f0:04")
+ Facter::Util::IP.get_arp_value("eth0").should == "00:00:0c:9f:f0:04"
+ end
end