forked from inverse-inc/packetfence
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
01ae738
commit fad8b6c
Showing
2 changed files
with
13 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 1,13 @@ | ||
[r1] | ||
inherit_vlan=enabled | ||
|
||
[r2] | ||
parent=r1 | ||
inherit_vlan=enabled | ||
|
||
[r3] | ||
parent=r2 | ||
acls=<<EOT | ||
allow tcp 80 | ||
EOT | ||
inherit_vlan=enabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,12 22,12 @@ BEGIN { | |
use setup_test_config; | ||
} | ||
|
||
use Test::More tests => 8; | ||
use Test::More tests => 14; | ||
use pf::Switch; | ||
|
||
#This test will running last | ||
use Test::NoWarnings; | ||
my $switch = pf::Switch->new(); | ||
my $switch = pf::Switch->new( { vlans => { r1 => "gotOne", r2 => "gotTwo" }, id => 'test' }); | ||
|
||
is( | ||
$switch->extractSsid({'Called-Station-SSID' => 'Bob'}), | ||
|
@@ -71,6 71,14 @@ is( | |
"getAccessListByName undef", | ||
); | ||
|
||
is(pf::Switch::_parentRoleForVlan("r3"), "r2", "parent role for vlan r3 is r2"); | ||
is(pf::Switch::_parentRoleForVlan("r2"), "r1", "parent role for vlan r2 is r1"); | ||
is(pf::Switch::_parentRoleForVlan("r1"), undef, "parent role for vlan r1 is undef"); | ||
|
||
is($switch->getVlanByName("r3"), "gotTwo", "Got the parent vlan"); | ||
is($switch->getVlanByName("r2"), "gotTwo", "Got my vlan"); | ||
is($switch->getVlanByName("r1"), "gotOne", "Got my vlan"); | ||
|
||
=head1 AUTHOR | ||
Inverse inc. <[email protected]> | ||
|