mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
OS Testing update (#7971)
* OS Testing update Option on pre-commit.php to run tests for just one OS. Reorganize tests a bit to support this. Improved bgp-peers capture and os module capture (initial) Better output when phpunit tests fail * fix a couple issues. Better output for another * Use the correct setup function
This commit is contained in:
@@ -32,6 +32,9 @@ use LibreNMS\Util\ModuleTestHelper;
|
||||
class OSModulesTest extends DBTestCase
|
||||
{
|
||||
/**
|
||||
* Test all modules for a particular OS
|
||||
*
|
||||
* @group os
|
||||
* @dataProvider dumpedDataProvider
|
||||
* @param string $target_os
|
||||
* @param string $filename
|
||||
@@ -55,13 +58,13 @@ class OSModulesTest extends DBTestCase
|
||||
$this->assertEquals(
|
||||
$data['discovery'],
|
||||
$results[$module]['discovery'],
|
||||
"OS $target_os: Discovered $module data does not match that found in $filename"
|
||||
"OS $target_os: Discovered $module data does not match that found in $filename\n" . $helper->getLastDiscoveryOutput()
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
$data['poller'] == 'matches discovery' ? $data['discovery'] : $data['poller'],
|
||||
$results[$module]['poller'],
|
||||
"OS $target_os: Polled $module data does not match that found in $filename"
|
||||
"OS $target_os: Polled $module data does not match that found in $filename\n" . $helper->getLastPollerOutput()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user