fix: complete hardware collection diagnostics
This commit is contained in:
@@ -33,6 +33,14 @@ func TestParseSFPDOM(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSFPModuleFromLegacyUsesContractShape(t *testing.T) {
|
||||
identifier, wavelength := "QSFP-DD", 1310.4
|
||||
m := sfpModuleFromLegacy(1, schema.HardwarePCIeDevice{SFPIdentifier: &identifier, SFPWavelengthNM: &wavelength})
|
||||
if m.Port != 1 || m.Identifier == nil || *m.Identifier != "QSFP-DD" || m.WavelengthNM == nil || *m.WavelengthNM != 1310 {
|
||||
t.Fatalf("module=%#v", m)
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseLSPCIDetailSerial(t *testing.T) {
|
||||
raw := `
|
||||
05:00.0 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6]
|
||||
|
||||
Reference in New Issue
Block a user