mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Wrong snmpsim endpoint for TravisCI pre-start (#11706)
* Wrong snmpsim endpoint for TravisCI pre-start * Fix full check parsing
This commit is contained in:
+1
-1
@@ -40,7 +40,7 @@ after_failure:
|
||||
before_script:
|
||||
- phpenv config-rm xdebug.ini
|
||||
- test -n "$SKIP_WEB_CHECK" || php artisan serve --env=dusk.testing 2>/dev/null &
|
||||
- test -n "$SKIP_UNIT_CHECK" || ~/.local/bin/snmpsimd.py --data-dir=tests/snmpsim --agent-udpv4-endpoint=127.1.6.1:1161 --logging-method=file:/tmp/snmpsimd.log &
|
||||
- test -n "$SKIP_UNIT_CHECK" || ~/.local/bin/snmpsimd.py --data-dir=tests/snmpsim --agent-udpv4-endpoint=127.1.6.2:1162 --logging-method=file:/tmp/snmpsimd.log &
|
||||
|
||||
script:
|
||||
- php artisan dev:check ci
|
||||
|
||||
@@ -415,8 +415,8 @@ class CiHelper
|
||||
|
||||
private function parseChangedFiles()
|
||||
{
|
||||
if ($this->flags['full']) {
|
||||
// nothing to do
|
||||
if ($this->flags['full'] || !empty($this->changed['full-checks'])) {
|
||||
$this->flags['full'] = true; // make sure full is set and skip changed file parsing
|
||||
return;
|
||||
}
|
||||
$this->os = $this->os ?: $this->changed['os'];
|
||||
@@ -429,11 +429,10 @@ class CiHelper
|
||||
'unit_docs' => !empty($this->changed['docs']) && empty($this->changed['php']),
|
||||
'unit_svg' => !empty($this->changed['svg']) && empty($this->changed['php']),
|
||||
'docs_changed' => !empty($this->changed['docs']),
|
||||
'full' => !empty($this->changed['full-checks']),
|
||||
]);
|
||||
|
||||
$this->setFlags([
|
||||
'unit_skip' => empty($this->changed['php']) && !array_sum(Arr::only($this->getFlags(), ['unit_os', 'unit_docs', 'unit_svg', 'unit_modules', 'docs_changed'])),
|
||||
'unit_skip' => empty($this->changed['php']) && !array_sum(Arr::only($this->getFlags(), ['full', 'unit_os', 'unit_docs', 'unit_svg', 'unit_modules', 'docs_changed'])),
|
||||
'lint_skip' => array_sum(Arr::only($this->getFlags(), ['lint_skip_php', 'lint_skip_python', 'lint_skip_bash'])) === 3,
|
||||
'style_skip' => empty($this->changed['php']),
|
||||
'web_skip' => empty($this->changed['php']) && empty($this->changed['resources']),
|
||||
|
||||
@@ -240,6 +240,13 @@ class CiHelperTest extends TestCase
|
||||
'lint_skip_bash' => true,
|
||||
'unit_svg' => true,
|
||||
]);
|
||||
|
||||
putenv('FILES=.travis.yml');
|
||||
$helper = new CiHelper();
|
||||
$helper->detectChangedFiles();
|
||||
$this->assertFlagsSet($helper, [
|
||||
'full' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
private function assertFlagsSet(CiHelper $helper, $flags = [])
|
||||
|
||||
Reference in New Issue
Block a user