Closed bewing closed 7 years ago
Both get_lldp_neighbors() and get_lldp_neighbors_detail() fail.
Yes, that's done on purpose to avoid rigging the tests but that shouldn't be a big deal, is it? The method should work regardless, this is just for the test. Have you encountered some problem because of this? We could remove the assertion, that's fine.
I've only encounted problems when running unit tests without the mock driver -- IE, when running against a VM with no LLDP neighbors, or against a device with no LLDP neighbors. It's not really major enough to make me mad, though. Was just interested if there was a way to work around.
when running against a VM with no LLDP neighbors, or against a device with no LLDP neighbors
Oh, ok. Misunderstood you. In that case I think we could have a IGNORE_EMPTY
envvar we can set to deliberately avoid failing on empty data.
When testing devices without the mock driver, if no LLDP neighbors exist, unit tests fail, as it is expected that the LLDP neighbor count is greater than 0. It is possible for a device to have zero LLDP neighbors.