Hello,
Somebody can help me to fix problem with my pull-request https://github.com/librenms/librenms/pull/12038#issuecomment-684803105 ?
=> I don’t know how to fix the problem with Travis CI validator
Hello,
Somebody can help me to fix problem with my pull-request https://github.com/librenms/librenms/pull/12038#issuecomment-684803105 ?
=> I don’t know how to fix the problem with Travis CI validator
Hi,
1) LibreNMS\Tests\OSModulesTest::testOS with data set "ifotec_inetpoe-4gp2gf" ('ifotec', 'inetpoe-4gp2gf', array('os', 'ports', 'sensors', 'vlans'))
OS ifotec: Discovered os data does not match that found in tests/data/ifotec_inetpoe-4gp2gf.json
OS ifotec: Discovered os data does not match that found in tests/data/ifotec_inetpoe-4gp2gf.json
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
'sysObjectID' => '.1.3.6.1.4.1.21362.100.1.4.3.4'
'sysDescr' => 'INETPOE-4GP2GF : Switch 2 por...-T PoE'
'sysContact' => null
- 'version' => '1.0.5d (Bootloader x.x.x)'
+ 'version' => ' (Bootloader )'
'hardware' => 'INETPOE-4GP2GF'
'features' => null
'os' => 'ifotec'
'type' => 'network'
- 'serial' => '0051'
+ 'serial' => null
'icon' => 'ifotec.png'
'location' => null
In the json the expected value for version is 1.0.5d (Bootloader x.x.x)
but it is getting (Bootloader )
so make sure your code is correct as I dont think (Bootloader )
is the correct value for version
Source code to update ‘version’ is :
$oids = [
'21362.101.1.2.1.5.' . $ifoSysProductIndex,
'21362.101.1.2.1.7.' . $ifoSysProductIndex,
'21362.101.1.2.1.8.' . $ifoSysProductIndex
];
$oids2 = [
'.1.3.6.1.4.1.' . $oids[0],
'.1.3.6.1.4.1.' . $oids[1],
'.1.3.6.1.4.1.' . $oids[2]
];
$data = snmp_get_multi($this->getDevice(), $oids2, ['-OQUs']);
$device->version = $data[$oids[1]]['enterprises'] . " (Bootloader " . $data[$oids[2]]['enterprises'] . ")";
Tracvis CI set " (Bootloader )" because $data seems empty… but I d’ont know why…
tests/snmpsim/ifotec_inetpoe-4gp2gf.snmpref seems good because it contains :
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.21362.100.1.4.3.4
1.3.6.1.4.1.21362.101.1.1.0|2|1
1.3.6.1.4.1.21362.101.1.2.1.5.1|4|0051
1.3.6.1.4.1.21362.101.1.2.1.7.1|4|1.0.5d
1.3.6.1.4.1.21362.101.1.2.1.8.1|4|x.x.x
When I execute this command line, tests are passed :
./lnms dev:check -o ifotec
… where is the problem T_T ?