mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
Tests: Add tests that both /api/history and /api/history/clients return full 24h data
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -1292,6 +1292,18 @@
|
||||
[[ ${lines[0]} == '"xn--bc-uia.com"' ]]
|
||||
}
|
||||
|
||||
@test "API history: Returns full 24 hours even if only a few queries are made" {
|
||||
run bash -c 'curl -s 127.0.0.1/api/history | jq ".history | length"'
|
||||
printf "%s\n" "${lines[@]}"
|
||||
[[ ${lines[0]} == "145" ]]
|
||||
}
|
||||
|
||||
@test "API history/clients: Returns full 24 hours even if only a few queries are made" {
|
||||
run bash -c 'curl -s 127.0.0.1/api/history/clients | jq ".history | length"'
|
||||
printf "%s\n" "${lines[@]}"
|
||||
[[ ${lines[0]} == "145" ]]
|
||||
}
|
||||
|
||||
@test "API authorization (without password): No login required" {
|
||||
run bash -c 'curl -s 127.0.0.1/api/auth'
|
||||
printf "%s\n" "${lines[@]}"
|
||||
|
||||
Reference in New Issue
Block a user