mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
Adjust Travis tests as the hostname for 127.0.0.1 changed ... don't rely on it any longer
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
+8
-8
@@ -36,7 +36,7 @@ load 'libs/bats-support/load'
|
||||
echo "output: ${lines[@]}"
|
||||
[[ ${lines[0]} == "Connection to 127.0.0.1 4711 port [tcp/*] succeeded!" ]]
|
||||
[[ ${lines[1]} =~ "0 4 192.168.2.208" ]]
|
||||
[[ ${lines[2]} == "1 2 127.0.0.1 localhost" ]]
|
||||
[[ ${lines[2]} =~ "1 2 127.0.0.1"]]
|
||||
[[ ${lines[3]} =~ "2 1 10.8.0.2" ]]
|
||||
[[ ${lines[4]} == "---EOM---" ]]
|
||||
}
|
||||
@@ -106,8 +106,8 @@ load 'libs/bats-support/load'
|
||||
run bash -c 'echo ">getallqueries" | nc -v 127.0.0.1 4711'
|
||||
echo "output: ${lines[@]}"
|
||||
[[ ${lines[0]} == "Connection to 127.0.0.1 4711 port [tcp/*] succeeded!" ]]
|
||||
[[ ${lines[1]} =~ "IPv6 raspberrypi localhost 3" ]]
|
||||
[[ ${lines[2]} =~ "IPv4 checkip.dyndns.org localhost 2" ]]
|
||||
[[ ${lines[1]} =~ "IPv6 raspberrypi" ]]
|
||||
[[ ${lines[2]} =~ "IPv4 checkip.dyndns.org" ]]
|
||||
[[ ${lines[3]} =~ "IPv4 example.com" ]]
|
||||
[[ ${lines[4]} =~ "IPv4 play.google.com" ]]
|
||||
[[ ${lines[5]} =~ "IPv6 play.google.com" ]]
|
||||
@@ -134,19 +134,19 @@ load 'libs/bats-support/load'
|
||||
}
|
||||
|
||||
@test "Get all queries (client filtered)" {
|
||||
run bash -c 'echo ">getallqueries-client localhost" | nc -v 127.0.0.1 4711'
|
||||
run bash -c 'echo ">getallqueries-client 127.0.0.1" | nc -v 127.0.0.1 4711'
|
||||
echo "output: ${lines[@]}"
|
||||
[[ ${lines[0]} == "Connection to 127.0.0.1 4711 port [tcp/*] succeeded!" ]]
|
||||
[[ ${lines[1]} =~ "IPv6 raspberrypi localhost 3" ]]
|
||||
[[ ${lines[2]} =~ "IPv4 checkip.dyndns.org localhost 2" ]]
|
||||
[[ ${lines[1]} =~ "IPv6 raspberrypi" ]]
|
||||
[[ ${lines[2]} =~ "IPv4 checkip.dyndns.org" ]]
|
||||
[[ ${lines[3]} == "---EOM---" ]]
|
||||
}
|
||||
|
||||
@test "Get all queries (client + number filtered)" {
|
||||
run bash -c 'echo ">getallqueries-client localhost (6)" | nc -v 127.0.0.1 4711'
|
||||
run bash -c 'echo ">getallqueries-client 127.0.0.1 (6)" | nc -v 127.0.0.1 4711'
|
||||
echo "output: ${lines[@]}"
|
||||
[[ ${lines[0]} == "Connection to 127.0.0.1 4711 port [tcp/*] succeeded!" ]]
|
||||
[[ ${lines[1]} =~ "IPv4 checkip.dyndns.org localhost 2" ]]
|
||||
[[ ${lines[1]} =~ "IPv4 checkip.dyndns.org" ]]
|
||||
[[ ${lines[2]} == "---EOM---" ]]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user