From 074f2e7c8f9b24116245771c1178b9fb204acb83 Mon Sep 17 00:00:00 2001 From: "Eric A. Miller" Date: Tue, 15 Oct 2013 22:26:51 -0400 Subject: [PATCH] Fix ignore Net-SNMP configuration file snmp.conf option in t/test_class.pl and t/util/test_class_mocked.pl --- t/test_class.pl | 5 ++--- t/util/test_class_mocked.pl | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/t/test_class.pl b/t/test_class.pl index a1f873b7..b1b3dab9 100755 --- a/t/test_class.pl +++ b/t/test_class.pl @@ -73,8 +73,8 @@ if ( $ignore && !defined $mibdirs ) { pod2usage(1); } -if ($ignore) { local $ENV{'SNMPCONFPATH'} = $EMPTY } -if ($ignore) { local $ENV{'MIBDIRS'} = "$mibdirs" } +local $ENV{'SNMPCONFPATH'} = $EMPTY if $ignore; +local $ENV{'MIBDIRS'} = "$mibdirs" if $ignore; if ( defined $mibdirs ) { SNMP::addMibDirs($mibdirs); @@ -104,7 +104,6 @@ my $dev = $class->new( 'AutoSpecify' => 0, 'AutoVerBack' => 0, 'Debug' => $debug, - 'MibDirs' => $mibdirs, 'Version' => $ver, 'DestHost' => $device, 'Community' => $comm, diff --git a/t/util/test_class_mocked.pl b/t/util/test_class_mocked.pl index e339ffc0..09d05443 100755 --- a/t/util/test_class_mocked.pl +++ b/t/util/test_class_mocked.pl @@ -71,8 +71,8 @@ if ( $ignore && !defined $mibdirs ) { pod2usage(1); } -if ($ignore) { local $ENV{'SNMPCONFPATH'} = $EMPTY } -if ($ignore) { local $ENV{'MIBDIRS'} = "$mibdirs" } +local $ENV{'SNMPCONFPATH'} = $EMPTY if $ignore; +local $ENV{'MIBDIRS'} = "$mibdirs" if $ignore; if ( defined $mibdirs ) { SNMP::addMibDirs($mibdirs); @@ -99,7 +99,6 @@ my $dev = $class->new( 'AutoSpecify' => 0, 'BulkWalk' => 0, 'Debug' => $debug, - 'MibDirs' => $mibdirs, 'Session' => $mocked, ) or die "\n";