Always test all OS detection. (#12879)

This commit is contained in:
Tony Murray
2021-05-16 13:32:54 -05:00
committed by GitHub
parent d924f3f886
commit 3cd7043fa7
2 changed files with 3 additions and 3 deletions

View File

@@ -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']) {

View File

@@ -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()
{ {