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