From cd9c637ba5798e202978dfbabcefc06fde3abded Mon Sep 17 00:00:00 2001 From: Jeroen van Ingen Date: Fri, 9 Sep 2011 17:14:01 +0200 Subject: [PATCH] test_class.pl script: also test devices without layers / sysServices The test_class.pl script refused to test devices that don't implement sysServices. Since SNMP::Info has been modified to check connectivity by testing sysDescr as well, test_class.pl should follow that behaviour. --- t/test_class.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/test_class.pl b/t/test_class.pl index ae2e9375..31ca720d 100755 --- a/t/test_class.pl +++ b/t/test_class.pl @@ -82,9 +82,10 @@ print "Detected Class: ", $dev->device_type(), "\n"; print "Using Class: $Class (-c to change)\n"; my $layers = $dev->layers(); +my $descr = $dev->description(); -unless (defined $layers){ - die "Are you sure you got the right community string and version?\nCan't fetch layers.\n"; +unless (defined $layers or defined $descr){ + die "Are you sure you got the right community string and version?\nCan't fetch layers or description.\n"; } print "Fetching global info...\n\n";