Disable test devices to block normal poller (#9131)

Still could happen, but much less likely.
This commit is contained in:
Tony Murray
2018-09-03 01:46:02 -05:00
committed by Neil Lathwood
parent 7778e2d66c
commit ade409c4ec

View File

@@ -509,6 +509,10 @@ class ModuleTestHelper
try {
Config::set('snmp.community', [$this->file_name]);
$device_id = addHost($snmpsim->getIp(), 'v2c', $snmpsim->getPort());
// disable to block normal pollers
dbUpdate(['disabled' => 1], 'devices', 'device_id=?', [$device_id]);
$this->qPrint("Added device: $device_id\n");
} catch (\Exception $e) {
echo $this->file_name . ': ' . $e->getMessage() . PHP_EOL;