mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Improve Snmpsim usage to ease testing (#15471)
* Snmpsim use python venv Patch to enable listening while minimizing output Update lnms dev:simulate, tests, and ./scripts/save-test-data.php removed old option to start snmpsim from older scripts, use lnms dev:simulate * Apply fixes from StyleCI * various fixes * Remove patch official package is updated --------- Co-authored-by: StyleCI Bot <bot@styleci.io>
This commit is contained in:
@@ -143,9 +143,9 @@ class OSDiscoveryTest extends TestCase
|
||||
private function genDevice($community): Device
|
||||
{
|
||||
return new Device([
|
||||
'hostname' => $this->getSnmpsim()->getIP(),
|
||||
'hostname' => $this->getSnmpsim()->ip,
|
||||
'snmpver' => 'v2c',
|
||||
'port' => $this->getSnmpsim()->getPort(),
|
||||
'port' => $this->getSnmpsim()->port,
|
||||
'timeout' => 3,
|
||||
'retries' => 0,
|
||||
'snmp_max_repeaters' => 10,
|
||||
|
@@ -36,10 +36,11 @@ chdir($install_dir);
|
||||
ini_set('display_errors', '1');
|
||||
//error_reporting(E_ALL & ~E_WARNING);
|
||||
|
||||
$snmpsim = new Snmpsim('127.1.6.2', 1162, null);
|
||||
$snmpsim = new Snmpsim('127.1.6.2', 1162);
|
||||
if (getenv('SNMPSIM')) {
|
||||
if (! getenv('GITHUB_ACTIONS')) {
|
||||
$snmpsim->fork(6);
|
||||
$snmpsim->setupVenv();
|
||||
$snmpsim->start();
|
||||
}
|
||||
|
||||
// make PHP hold on a reference to $snmpsim so it doesn't get destructed
|
||||
|
Reference in New Issue
Block a user