agent: Remove bogus check from list_interfaces() unit test

The unit test for list_interfaces() checks that the hardware address
returned for each interface has non-zero length.  However, that need not be
the case.  Point-to-point devices, such as ppp, or tun devices in certain
configurations may not have a hardware address, which is represented as
a zero length address here.

This happens on my machine with a tun0 device created by OpenVPN.

fixes #1377

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson 2021-02-11 15:09:00 +11:00
parent e2c8c7e603
commit c9c7c12440

View File

@ -873,7 +873,6 @@ mod tests {
for iface in &list { for iface in &list {
assert_ne!(iface.name.len(), 0); assert_ne!(iface.name.len(), 0);
assert_ne!(iface.hwAddr.len(), 0);
assert_ne!(iface.mtu, 0); assert_ne!(iface.mtu, 0);
for ip in &iface.IPAddresses { for ip in &iface.IPAddresses {