mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Always test all OS detection. (#12879)
This commit is contained in:
@@ -185,7 +185,7 @@ class CiHelper
|
|||||||
$filter = implode('.*|', $this->os);
|
$filter = implode('.*|', $this->os);
|
||||||
// include tests that don't have data providers and only data sets that match
|
// include tests that don't have data providers and only data sets that match
|
||||||
array_push($phpunit_cmd, '--group', 'os');
|
array_push($phpunit_cmd, '--group', 'os');
|
||||||
array_push($phpunit_cmd, '--filter', "/::test[A-Za-z]+$|::test[A-Za-z]+ with data set \"$filter.*\"$/");
|
array_push($phpunit_cmd, '--filter', "/::test[A-Za-z]+$|::testOSDetection|::test[A-Za-z]+ with data set \"$filter.*\"$/");
|
||||||
} elseif ($this->flags['unit_docs']) {
|
} elseif ($this->flags['unit_docs']) {
|
||||||
array_push($phpunit_cmd, '--group', 'docs');
|
array_push($phpunit_cmd, '--group', 'docs');
|
||||||
} elseif ($this->flags['unit_svg']) {
|
} elseif ($this->flags['unit_svg']) {
|
||||||
|
@@ -60,7 +60,7 @@ class OSDiscoveryTest extends TestCase
|
|||||||
* @dataProvider osProvider
|
* @dataProvider osProvider
|
||||||
* @param string $os_name
|
* @param string $os_name
|
||||||
*/
|
*/
|
||||||
public function testOS($os_name)
|
public function testOSDetection($os_name)
|
||||||
{
|
{
|
||||||
$glob = Config::get('install_dir') . "/tests/snmpsim/$os_name*.snmprec";
|
$glob = Config::get('install_dir') . "/tests/snmpsim/$os_name*.snmprec";
|
||||||
$files = array_map(function ($file) {
|
$files = array_map(function ($file) {
|
||||||
@@ -83,7 +83,7 @@ class OSDiscoveryTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* Test that all files have been tested (removed from self::$unchecked_files
|
* Test that all files have been tested (removed from self::$unchecked_files
|
||||||
*
|
*
|
||||||
* @depends testOS
|
* @depends testOSDetection
|
||||||
*/
|
*/
|
||||||
public function testAllFilesTested()
|
public function testAllFilesTested()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user