mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
save-test-data.php: Print a message when we encounter a bad module name (#8274)
* Print a message when we encounter a bad module name (likely a typo) * Raise exception for invalid module name and handle it.
This commit is contained in:
@@ -27,6 +27,7 @@ namespace LibreNMS\Tests;
|
||||
|
||||
use LibreNMS\Config;
|
||||
use LibreNMS\Exceptions\FileNotFoundException;
|
||||
use LibreNMS\Exceptions\InvalidModuleException;
|
||||
use LibreNMS\Util\ModuleTestHelper;
|
||||
|
||||
class OSModulesTest extends DBTestCase
|
||||
@@ -54,6 +55,8 @@ class OSModulesTest extends DBTestCase
|
||||
$results = $helper->generateTestData($snmpsim, true);
|
||||
} catch (FileNotFoundException $e) {
|
||||
$this->fail($e->getMessage());
|
||||
} catch (InvalidModuleException $e) {
|
||||
$this->fail($e->getMessage());
|
||||
}
|
||||
|
||||
if (is_null($results)) {
|
||||
|
Reference in New Issue
Block a user