[Pkg-puppet-devel] [facter] 87/180: Add tests for OpenBSD ifconfig with bridge(4) rules.
Stig Sandbeck Mathisen
ssm at debian.org
Mon Jun 30 15:06:34 UTC 2014
This is an automated email from the git hooks/post-receive script.
ssm pushed a commit to branch master
in repository facter.
commit b8fbbf3547b289cbb70f7a88a80861799e4394e1
Author: Jasper Lievisse Adriaanse <jasper at humppa.nl>
Date: Tue Jul 2 17:10:32 2013 +0200
Add tests for OpenBSD ifconfig with bridge(4) rules.
http://projects.puppetlabs.com/issues/16630
---
spec/fixtures/ifconfig/openbsd_bridge_rules | 11 +++++++++++
spec/unit/macaddress_spec.rb | 12 ++++++++++++
2 files changed, 23 insertions(+)
diff --git a/spec/fixtures/ifconfig/openbsd_bridge_rules b/spec/fixtures/ifconfig/openbsd_bridge_rules
new file mode 100644
index 0000000..357de01
--- /dev/null
+++ b/spec/fixtures/ifconfig/openbsd_bridge_rules
@@ -0,0 +1,11 @@
+bridge0: flags=41
+ groups: bridge
+ priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp
+ vlan1 flags=3
+ port 5 ifpriority 0 ifcost 0
+ em0 flags=7
+ port 1 ifpriority 0 ifcost 0
+block out on em0 src 00:24:21:ef:1b:de
+pflog0: flags=41 mtu 33152
+ priority: 0
+ groups: pflog
diff --git a/spec/unit/macaddress_spec.rb b/spec/unit/macaddress_spec.rb
index 4550a93..1821c8d 100755
--- a/spec/unit/macaddress_spec.rb
+++ b/spec/unit/macaddress_spec.rb
@@ -58,4 +58,16 @@ describe "macaddress fact" do
end
end
+ describe "when run on OpenBSD with bridge(4) rules" do
+ it "should return macaddress information" do
+ Facter.fact(:kernel).stubs(:value).returns("OpenBSD")
+ Facter::Util::IP.stubs(:get_ifconfig).returns("/sbin/ifconfig")
+ Facter::Util::IP.stubs(:exec_ifconfig).
+ returns(ifconfig_fixture('openbsd_bridge_rules'))
+
+ proc { Facter.value(:macaddress) }.should_not raise_error
+ Facter.value(:macaddress).should be_nil
+ end
+ end
+
end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git
More information about the Pkg-puppet-devel
mailing list