mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
@@ -1326,3 +1326,12 @@
|
||||
printf "%s\n" "${lines[@]}"
|
||||
[[ "${lines[0]}" == "fe80::11" ]]
|
||||
}
|
||||
|
||||
@test "Reported default gateway is correct" {
|
||||
run bash -c 'echo ">gateway >quit" | nc -v 127.0.0.1 4711'
|
||||
printf "%s\n" "${lines[@]}"
|
||||
# Check gateway IP address
|
||||
[[ "$(awk '{print $1}' <<< "${lines[0]}")" == "$(ip -4 route show default | awk '{print $3}')" ]]
|
||||
# Check gateway interface
|
||||
[[ "$(awk '{print $2}' <<< "${lines[0]}")" == "$(ip -4 route show default | awk '{print $5}')" ]]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user