mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 00:06:59 +00:00
tests: add json tests, and make fail output loud
Gilles reported the full-json is currently broken, which the new check demonstrates. Luckily the issue occurs only when active leases details are being queried, leaving the count to be correct. That said bug is a bug, and that should be corrected. Reported-by: Gilles Bouthenot <gilles.bouthenot@univ-fcomte.fr> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
a768049f3e
commit
d8aae53968
8 changed files with 63 additions and 5 deletions
10
tests/expected/same-twice
Normal file
10
tests/expected/same-twice
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Ranges:
|
||||
shared net name first ip last ip max cur percent touch t+c t+c perc
|
||||
All networks 10.0.0.1 - 10.0.0.10 10 1 10.000 0 1 10.000
|
||||
|
||||
Shared networks:
|
||||
name max cur percent touch t+c t+c perc
|
||||
|
||||
Sum of all ranges:
|
||||
name max cur percent touch t+c t+c perc
|
||||
All networks 10 1 10.000 0 1 10.000
|
||||
16
tests/expected/same-twice-json
Normal file
16
tests/expected/same-twice-json
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"active_leases": [
|
||||
{ "ip":"10.0.0.5", "macaddress":"00:00:00:00:00:00" }
|
||||
],
|
||||
"subnets": [
|
||||
{ "location":"All networks", "range":"10.0.0.1 - 10.0.0.10", "defined":10, "used":1, "free":9 }
|
||||
],
|
||||
"shared-networks": [
|
||||
],
|
||||
"summary": {
|
||||
"location":"All networks",
|
||||
"defined":10,
|
||||
"used":1,
|
||||
"free":9
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue