mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix tests (#6870)
Injecting into the dev_cache without having hostname set caused the code to run an sql query. Fix undefined index errors.
This commit is contained in:
@@ -238,7 +238,7 @@ class SyslogTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
// populate fake $dev_cache and $config
|
||||
global $config, $dev_cache;
|
||||
$dev_cache['1.1.1.1'] = array('device_id' => 1, 'os' => 'zywall', 'version' => 1);
|
||||
$dev_cache['1.1.1.1'] = array('device_id' => 1, 'os' => 'zywall', 'version' => 1, 'hostname' => 'zywall');
|
||||
$config = array();
|
||||
$config['syslog_filter'] = array();
|
||||
|
||||
|
Reference in New Issue
Block a user