Scrub real LAN addresses, MACs and name from docs and test fixtures
This commit is contained in:
parent
c9738358de
commit
3d0e4bd153
6 changed files with 20 additions and 20 deletions
|
|
@ -113,20 +113,20 @@ def test_macos_parsers():
|
|||
route = """ route to: default
|
||||
destination: default
|
||||
mask: default
|
||||
gateway: 192.168.68.1
|
||||
gateway: 10.9.8.1
|
||||
interface: en0
|
||||
flags: <UP,GATEWAY,DONE,STATIC,PRCLONING,GLOBAL>
|
||||
"""
|
||||
assert checks.parse_route_get(route) == "192.168.68.1"
|
||||
assert checks.parse_route_get(route) == "10.9.8.1"
|
||||
assert checks.parse_route_get("route: writing to routing socket: not in table\n") is None
|
||||
arp = """? (192.168.68.1) at 0:ef:15:97:fc:1e on en0 ifscope [ethernet]
|
||||
? (192.168.68.20) at e0:51:d8:1c:5f:96 on en0 ifscope [ethernet]
|
||||
? (192.168.68.77) at (incomplete) on en0 ifscope [ethernet]
|
||||
? (192.168.68.255) at ff:ff:ff:ff:ff:ff on en0 ifscope [ethernet]
|
||||
? (192.168.64.2) at 2a:1:3:4:5:6 on bridge100 ifscope [bridge]
|
||||
arp = """? (10.9.8.1) at 0:02:aa:bb:1c:3d on en0 ifscope [ethernet]
|
||||
? (10.9.8.20) at 2:51:d8:1c:5f:96 on en0 ifscope [ethernet]
|
||||
? (10.9.8.77) at (incomplete) on en0 ifscope [ethernet]
|
||||
? (10.9.8.255) at ff:ff:ff:ff:ff:ff on en0 ifscope [ethernet]
|
||||
? (10.9.7.2) at 2a:1:3:4:5:6 on bridge100 ifscope [bridge]
|
||||
? (224.0.0.251) at 1:0:5e:0:0:fb on en0 ifscope permanent [ethernet]
|
||||
"""
|
||||
assert checks.parse_arp_an(arp) == [
|
||||
{"ip": "192.168.68.1", "mac": "00:ef:15:97:fc:1e"},
|
||||
{"ip": "192.168.68.20", "mac": "e0:51:d8:1c:5f:96"},
|
||||
{"ip": "10.9.8.1", "mac": "00:02:aa:bb:1c:3d"},
|
||||
{"ip": "10.9.8.20", "mac": "02:51:d8:1c:5f:96"},
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue