[tests] Adjust test to work in unsupported scenarios
On Android (possibly on other systems too) it is possible that no gateway address is available and its lack is NOT an error
Here is a sample of /proc/net/route from Nexus 9 running Android 5.1.1 (IPInterfaceProperties parses that file on Linux)
Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT
wlan0
0001A8C0 00000000 0001 0 0 0
00FFFFFF 0 0 0
Gateway is set to any address and it is explicitly ignored by the route information parser
For comparison, here's route contents from an Android 4.4.4 device:
Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT
wlan0
00000000 0101A8C0 0003 0 0 0
00000000 0 0 0
wlan0
00000000 0101A8C0 0003 0 0 203
00000000 0 0 0
wlan0
0001A8C0 00000000 0001 0 0 0
00FFFFFF 0 0 0
wlan0
0001A8C0 00000000 0001 0 0 0
00FFFFFF 0 0 0
wlan0
0001A8C0 00000000 0001 0 0 203
00FFFFFF 0 0 0
wlan0
0101A8C0 00000000 0005 0 0 0
FFFFFFFF 0 0 0
Obviously, this test fails on the first device and succeeds on the second. For this reason the test is modified to succeed
in case of devices like the first one since it's not a real failure but a shortcoming of the .NET API