Fix ignore Net-SNMP configuration file snmp.conf option in t/test_class.pl and t/util/test_class_mocked.pl
This commit is contained in:
@@ -73,8 +73,8 @@ if ( $ignore && !defined $mibdirs ) {
|
|||||||
pod2usage(1);
|
pod2usage(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ignore) { local $ENV{'SNMPCONFPATH'} = $EMPTY }
|
local $ENV{'SNMPCONFPATH'} = $EMPTY if $ignore;
|
||||||
if ($ignore) { local $ENV{'MIBDIRS'} = "$mibdirs" }
|
local $ENV{'MIBDIRS'} = "$mibdirs" if $ignore;
|
||||||
|
|
||||||
if ( defined $mibdirs ) {
|
if ( defined $mibdirs ) {
|
||||||
SNMP::addMibDirs($mibdirs);
|
SNMP::addMibDirs($mibdirs);
|
||||||
@@ -104,7 +104,6 @@ my $dev = $class->new(
|
|||||||
'AutoSpecify' => 0,
|
'AutoSpecify' => 0,
|
||||||
'AutoVerBack' => 0,
|
'AutoVerBack' => 0,
|
||||||
'Debug' => $debug,
|
'Debug' => $debug,
|
||||||
'MibDirs' => $mibdirs,
|
|
||||||
'Version' => $ver,
|
'Version' => $ver,
|
||||||
'DestHost' => $device,
|
'DestHost' => $device,
|
||||||
'Community' => $comm,
|
'Community' => $comm,
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ if ( $ignore && !defined $mibdirs ) {
|
|||||||
pod2usage(1);
|
pod2usage(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ignore) { local $ENV{'SNMPCONFPATH'} = $EMPTY }
|
local $ENV{'SNMPCONFPATH'} = $EMPTY if $ignore;
|
||||||
if ($ignore) { local $ENV{'MIBDIRS'} = "$mibdirs" }
|
local $ENV{'MIBDIRS'} = "$mibdirs" if $ignore;
|
||||||
|
|
||||||
if ( defined $mibdirs ) {
|
if ( defined $mibdirs ) {
|
||||||
SNMP::addMibDirs($mibdirs);
|
SNMP::addMibDirs($mibdirs);
|
||||||
@@ -99,7 +99,6 @@ my $dev = $class->new(
|
|||||||
'AutoSpecify' => 0,
|
'AutoSpecify' => 0,
|
||||||
'BulkWalk' => 0,
|
'BulkWalk' => 0,
|
||||||
'Debug' => $debug,
|
'Debug' => $debug,
|
||||||
'MibDirs' => $mibdirs,
|
|
||||||
'Session' => $mocked,
|
'Session' => $mocked,
|
||||||
) or die "\n";
|
) or die "\n";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user