refactor: pre-commit.php updates (#8679)

Disable the log for unit tests to speed things up hopefully
This commit is contained in:
Tony Murray
2018-05-09 06:53:45 -05:00
committed by Neil Lathwood
parent 5273b291bf
commit 8afafe7eb0
9 changed files with 53 additions and 61 deletions

View File

@@ -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' => '',
);
];
}
/**