mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: pre-commit.php updates (#8679)
Disable the log for unit tests to speed things up hopefully
This commit is contained in:
committed by
Neil Lathwood
parent
5273b291bf
commit
8afafe7eb0
@@ -101,8 +101,9 @@ class OSDiscoveryTest extends TestCase
|
||||
private function checkOS($expected_os, $filename = null)
|
||||
{
|
||||
$community = $filename ?: $expected_os;
|
||||
global $debug;
|
||||
global $debug, $vdebug;
|
||||
$debug = true;
|
||||
$vdebug = true;
|
||||
ob_start();
|
||||
$os = getHostOS($this->genDevice($community));
|
||||
$output = ob_get_contents();
|
||||
@@ -119,18 +120,18 @@ class OSDiscoveryTest extends TestCase
|
||||
*/
|
||||
private function genDevice($community)
|
||||
{
|
||||
return array(
|
||||
return [
|
||||
'device_id' => 1,
|
||||
'hostname' => $this->snmpsimIp,
|
||||
'hostname' => $this->snmpsim->getIP(),
|
||||
'snmpver' => 'v2c',
|
||||
'port' => $this->snmpsimPort,
|
||||
'port' => $this->snmpsim->getPort(),
|
||||
'timeout' => 3,
|
||||
'retries' => 0,
|
||||
'snmp_max_repeaters' => 10,
|
||||
'community' => $community,
|
||||
'os' => 'generic',
|
||||
'os_group' => '',
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user