trapeze and nws deep recursion fix (#443)

* trapeze serial deep recursion

* NWSS2300 has the same problem

* same workaround as trapeze

* return empty if not found
This commit is contained in:
nick n
2021-10-07 09:52:45 +02:00
committed by GitHub
parent dd1688a587
commit 9f12bcf676
4 changed files with 52 additions and 8 deletions

View File

@@ -51,6 +51,9 @@ sub setup : Tests(setup) {
'_description' =>
'Juniper Networks, Inc WLC880R 7.5.1.6 REL',
# TRAPEZE-NETWORKS-BASIC-MIB
'_trpzSerialNumber' => '0882200159',
# TRAPEZE-NETWORKS-REGISTRATION-DEVICES-MIB::wirelessLANController880R
'_id' => '.1.3.6.1.4.1.14525.3.3.1',
'store' => {},
@@ -79,4 +82,15 @@ sub vendor : Tests(2) {
is($test->{info}->vendor(), 'juniper', q(Vendor returns 'juniper'));
}
sub serial : Tests(3) {
my $test = shift;
can_ok($test->{info}, 'serial');
is($test->{info}->serial(), '0882200159', q(Serial is expected value));
$test->{info}->clear_cache();
is($test->{info}->serial(), undef,
q(No serial returns undef));
}
1;