mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 18:38:25 +00:00
Fix dev:check fail-fast not returning error (#11672)
Fix dantherm definition
This commit is contained in:
parent
3c4751e3c7
commit
e7d954d7df
@ -127,7 +127,7 @@ class CiHelper
|
||||
$ret = $this->runCheck($check);
|
||||
|
||||
if ($this->flags['fail-fast'] && $ret !== 0 && $ret !== 250) {
|
||||
return $return;
|
||||
return $ret;
|
||||
} else {
|
||||
$return += $ret;
|
||||
}
|
||||
@ -311,7 +311,7 @@ class CiHelper
|
||||
return $ret;
|
||||
}
|
||||
|
||||
if ($this->flags["{$type}_skip"]) {
|
||||
if ($this->flags["{$type}_enable"] && $this->flags["{$type}_skip"]) {
|
||||
echo ucfirst($type) . " check skipped.\n";
|
||||
}
|
||||
return 0;
|
||||
@ -394,10 +394,10 @@ class CiHelper
|
||||
|
||||
public function checkEnvSkips()
|
||||
{
|
||||
$this->flags['unit_skip'] = (bool)getenv('SKIP_UNIT_CHECK');
|
||||
$this->flags['lint_skip'] = (bool)getenv('SKIP_LINT_CHECK');
|
||||
$this->flags['web_skip'] = (bool)getenv('SKIP_WEB_CHECK');
|
||||
$this->flags['style_skip'] = (bool)getenv('SKIP_STYLE_CHECK');
|
||||
$this->flags['unit_skip'] = $this->flags['unit_skip'] || getenv('SKIP_UNIT_CHECK');
|
||||
$this->flags['lint_skip'] = $this->flags['lint_skip'] || getenv('SKIP_LINT_CHECK');
|
||||
$this->flags['web_skip'] = $this->flags['web_skip'] || getenv('SKIP_WEB_CHECK');
|
||||
$this->flags['style_skip'] = $this->flags['style_skip'] || getenv('SKIP_STYLE_CHECK');
|
||||
}
|
||||
|
||||
public function detectChangedFiles()
|
||||
|
@ -37,7 +37,13 @@ class FileCategorizer extends Categorizer
|
||||
|
||||
if (getenv('CIHELPER_DEBUG')) {
|
||||
$this->setSkippable(function ($item) {
|
||||
return in_array($item, ['.travis.yml', 'LibreNMS/Util/CiHelper.php', 'LibreNMS/Util/FileCategorizer.php']);
|
||||
return in_array($item, [
|
||||
'.travis.yml',
|
||||
'LibreNMS/Util/CiHelper.php',
|
||||
'LibreNMS/Util/FileCategorizer.php',
|
||||
'app/Console/Commands/DevCheckCommand.php',
|
||||
'tests/Unit/CiHelperTest.php',
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,23 +1,20 @@
|
||||
mib: DANTHERM-COOLING-MIB
|
||||
mib: DANTHERM-COOLING-MIB
|
||||
modules:
|
||||
sensors:
|
||||
temperature:
|
||||
data:
|
||||
-
|
||||
oid: onBoardTempr
|
||||
value: onBoardTempr
|
||||
index: onBoardTempr.{{ $index }}
|
||||
num_oid: .1.3.6.1.4.1.46651.1.1.1.{{ $index }}
|
||||
descr: onBoard Tempr
|
||||
-
|
||||
oid: roomTempr
|
||||
value: roomTempr
|
||||
index: roomTempr.{{ $index }}
|
||||
num_oid: .1.3.6.1.4.1.46651.1.1.2.{{ $index }}
|
||||
descr: room Tempr
|
||||
descr: room Tempr
|
||||
-
|
||||
oid: hotSpotTempr
|
||||
value: hotSpotTempr
|
||||
index: hotSpotTempr.{{ $index }}
|
||||
num_oid: .1.3.6.1.4.1.46651.1.1.3.{{ $index }}
|
||||
descr: hotSpot Tempr
|
||||
@ -25,13 +22,11 @@ modules:
|
||||
data:
|
||||
-
|
||||
oid: fan1RPM
|
||||
value: fan1RPM
|
||||
index: fan1RPM.{{ $index }}
|
||||
num_oid: .1.3.6.1.4.1.46651.1.1.8.{{ $index }}
|
||||
descr: fan1 RPM
|
||||
-
|
||||
oid: fan2RPM
|
||||
value: fan2RPM
|
||||
index: fan2RPM.{{ $index }}
|
||||
num_oid: .1.3.6.1.4.1.46651.1.1.9.{{ $index }}
|
||||
descr: fan2 RPM
|
||||
@ -39,20 +34,20 @@ modules:
|
||||
data:
|
||||
-
|
||||
oid: fan1Status
|
||||
value: fan1Status
|
||||
num_oid: .1.3.6.1.4.1.46651.1.1.18.{{ $index }}
|
||||
descr: Fan 1 operation status
|
||||
state_name: fan1Status_states
|
||||
index: fan1Status.{{ $index }}
|
||||
state_name: fanStatus_states
|
||||
states:
|
||||
- { value: 0, graph: 0, generic: 2, descr: Off }
|
||||
- { value: 1, graph: 0, generic: 0, descr: On }
|
||||
- { value: 2, graph: 0, generic: 1, descr: Emergency/Boost }
|
||||
-
|
||||
oid: fan2Status
|
||||
value: fan2Status
|
||||
num_oid: .1.3.6.1.4.1.46651.1.1.19.{{ $index }}
|
||||
descr: Fan 2 operation status
|
||||
state_name: fan2Status_states
|
||||
index: fan2Status.{{ $index }}
|
||||
state_name: fanStatus_states
|
||||
states:
|
||||
- { value: 0, graph: 0, generic: 2, descr: Off }
|
||||
- { value: 1, graph: 0, generic: 0, descr: On }
|
||||
|
@ -68,10 +68,12 @@ if (getenv('DBTEST')) {
|
||||
|
||||
// try to avoid erasing people's primary databases
|
||||
if ($db_config['database'] !== \config('database.connections.mysql.database', 'librenms')) {
|
||||
echo "Refreshing database...";
|
||||
$migrate_result = Artisan::call('migrate:fresh', ['--seed' => true, '--env' => 'testing', '--database' => 'testing']);
|
||||
$migrate_output = Artisan::output();
|
||||
echo "done\n";
|
||||
if (!getenv('SKIP_DB_REFRESH')) {
|
||||
echo "Refreshing database...";
|
||||
$migrate_result = Artisan::call('migrate:fresh', ['--seed' => true, '--env' => 'testing', '--database' => 'testing']);
|
||||
$migrate_output = Artisan::output();
|
||||
echo "done\n";
|
||||
}
|
||||
} else {
|
||||
echo "Info: Refusing to reset main database: {$db_config['database']}. Running migrations.\n";
|
||||
$migrate_result = Artisan::call('migrate', ['--seed' => true, '--env' => 'testing', '--database' => 'testing']);
|
||||
|
@ -93,8 +93,8 @@
|
||||
"sensor_class": "state",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.46651.1.1.18.0",
|
||||
"sensor_index": "0",
|
||||
"sensor_type": "fan1Status_states",
|
||||
"sensor_index": "fan1Status.0",
|
||||
"sensor_type": "fanStatus_states",
|
||||
"sensor_descr": "Fan 1 operation status",
|
||||
"group": null,
|
||||
"sensor_divisor": 1,
|
||||
@ -110,15 +110,15 @@
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": "fan1Status_states"
|
||||
"state_name": "fanStatus_states"
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "state",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.46651.1.1.19.0",
|
||||
"sensor_index": "0",
|
||||
"sensor_type": "fan2Status_states",
|
||||
"sensor_index": "fan2Status.0",
|
||||
"sensor_type": "fanStatus_states",
|
||||
"sensor_descr": "Fan 2 operation status",
|
||||
"group": null,
|
||||
"sensor_divisor": 1,
|
||||
@ -134,7 +134,7 @@
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": "fan2Status_states"
|
||||
"state_name": "fanStatus_states"
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
@ -211,46 +211,25 @@
|
||||
],
|
||||
"state_indexes": [
|
||||
{
|
||||
"state_name": "fan1Status_states",
|
||||
"state_name": "fanStatus_states",
|
||||
"state_descr": "Off",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 0,
|
||||
"state_generic_value": 0
|
||||
"state_generic_value": 2
|
||||
},
|
||||
{
|
||||
"state_name": "fan1Status_states",
|
||||
"state_name": "fanStatus_states",
|
||||
"state_descr": "On",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 1,
|
||||
"state_generic_value": 0
|
||||
},
|
||||
{
|
||||
"state_name": "fan1Status_states",
|
||||
"state_name": "fanStatus_states",
|
||||
"state_descr": "Emergency/Boost",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 2,
|
||||
"state_generic_value": 0
|
||||
},
|
||||
{
|
||||
"state_name": "fan2Status_states",
|
||||
"state_descr": "Off",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 0,
|
||||
"state_generic_value": 0
|
||||
},
|
||||
{
|
||||
"state_name": "fan2Status_states",
|
||||
"state_descr": "On",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 1,
|
||||
"state_generic_value": 0
|
||||
},
|
||||
{
|
||||
"state_name": "fan2Status_states",
|
||||
"state_descr": "Emergency/Boost",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 2,
|
||||
"state_generic_value": 0
|
||||
"state_generic_value": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user