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:
Tony Murray
2024-07-17 16:05:07 -05:00
committed by GitHub
parent 10669226fc
commit 1cceafb887
11 changed files with 100 additions and 212 deletions

View File

@@ -5,7 +5,6 @@ use Illuminate\Support\Str;
use LibreNMS\Exceptions\InvalidModuleException;
use LibreNMS\Util\Debug;
use LibreNMS\Util\ModuleTestHelper;
use LibreNMS\Util\Snmpsim;
$install_dir = realpath(__DIR__ . '/..');
chdir($install_dir);
@@ -23,18 +22,11 @@ $options = getopt(
'variant:',
'file:',
'debug',
'snmpsim',
'full',
'help',
]
);
if (isset($options['snmpsim'])) {
$snmpsim = new Snmpsim();
$snmpsim->run();
exit;
}
if (isset($options['v'])) {
$variant = $options['v'];
} elseif (isset($options['variant'])) {