mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 16:26:59 +00:00
tests: improve coverage
Add error condition checks. Add lease file binding states. Check all output formats. Check leases file that is in mad order, cse all sorting methods when checking this. Use json output to check status classfications. Add cidr range checks. Add conf include and comment parsing input checks. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
2849dde21b
commit
447241e6c3
33 changed files with 1059 additions and 51 deletions
241
tests/leases/binding-states
Normal file
241
tests/leases/binding-states
Normal file
|
|
@ -0,0 +1,241 @@
|
|||
lease 10.0.0.0 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:00;
|
||||
}
|
||||
|
||||
lease 10.0.0.1 {
|
||||
binding state free;
|
||||
hardware ethernet 00:00:00:00:00:01;
|
||||
}
|
||||
lease 10.0.0.1 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:01;
|
||||
}
|
||||
lease 10.0.0.1 {
|
||||
binding state abandoned;
|
||||
hardware ethernet 00:00:00:00:00:01;
|
||||
}
|
||||
lease 10.0.0.1 {
|
||||
binding state expired;
|
||||
hardware ethernet 00:00:00:00:00:01;
|
||||
}
|
||||
lease 10.0.0.1 {
|
||||
binding state released;
|
||||
hardware ethernet 00:00:00:00:00:01;
|
||||
}
|
||||
lease 10.0.0.1 {
|
||||
binding state backup;
|
||||
hardware ethernet 00:00:00:00:00:01;
|
||||
}
|
||||
|
||||
lease 10.0.0.2 {
|
||||
binding state free;
|
||||
hardware ethernet 00:00:00:00:00:02;
|
||||
}
|
||||
lease 10.0.0.2 {
|
||||
binding state abandoned;
|
||||
hardware ethernet 00:00:00:00:00:02;
|
||||
}
|
||||
lease 10.0.0.2 {
|
||||
binding state expired;
|
||||
hardware ethernet 00:00:00:00:00:02;
|
||||
}
|
||||
lease 10.0.0.2 {
|
||||
binding state released;
|
||||
hardware ethernet 00:00:00:00:00:02;
|
||||
}
|
||||
lease 10.0.0.2 {
|
||||
binding state backup;
|
||||
hardware ethernet 00:00:00:00:00:02;
|
||||
}
|
||||
lease 10.0.0.2 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:02;
|
||||
}
|
||||
|
||||
lease 10.0.0.3 {
|
||||
binding state free;
|
||||
hardware ethernet 00:00:00:00:00:03;
|
||||
}
|
||||
lease 10.0.0.4 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:04;
|
||||
}
|
||||
lease 10.0.0.5 {
|
||||
binding state expired;
|
||||
hardware ethernet 00:00:00:00:00:05;
|
||||
}
|
||||
lease 10.0.0.6 {
|
||||
binding state released;
|
||||
hardware ethernet 00:00:00:00:00:06;
|
||||
}
|
||||
lease 10.0.0.7 {
|
||||
binding state backup;
|
||||
hardware ethernet 00:00:00:00:00:07;
|
||||
}
|
||||
lease 10.0.0.8 {
|
||||
binding state none-existing-state;
|
||||
hardware ethernet 00:00:00:00:00:08;
|
||||
}
|
||||
lease 10.0.0.9 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:09;
|
||||
}
|
||||
lease 10.0.0.20 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:10;
|
||||
}
|
||||
lease 10.0.0.21 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:11;
|
||||
}
|
||||
|
||||
|
||||
lease 10.1.0.0 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:00;
|
||||
}
|
||||
lease 10.1.0.1 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:01;
|
||||
}
|
||||
lease 10.1.0.2 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:02;
|
||||
}
|
||||
lease 10.1.0.3 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:03;
|
||||
}
|
||||
lease 10.1.0.4 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:04;
|
||||
}
|
||||
lease 10.1.0.5 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:05;
|
||||
}
|
||||
lease 10.1.0.6 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:06;
|
||||
}
|
||||
lease 10.1.0.7 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:07;
|
||||
}
|
||||
lease 10.1.0.8 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:08;
|
||||
}
|
||||
lease 10.1.0.9 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:09;
|
||||
}
|
||||
lease 10.1.0.10 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:10;
|
||||
}
|
||||
|
||||
|
||||
lease 10.2.0.0 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:00;
|
||||
}
|
||||
lease 10.2.0.1 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:01;
|
||||
}
|
||||
lease 10.2.0.2 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:02;
|
||||
}
|
||||
lease 10.2.0.3 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:03;
|
||||
}
|
||||
lease 10.2.0.4 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:04;
|
||||
}
|
||||
lease 10.2.0.5 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:05;
|
||||
}
|
||||
lease 10.2.0.6 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:06;
|
||||
}
|
||||
lease 10.2.0.7 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:07;
|
||||
}
|
||||
lease 10.2.0.8 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:08;
|
||||
}
|
||||
|
||||
lease 10.3.0.0 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:00;
|
||||
}
|
||||
lease 10.3.0.1 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:01;
|
||||
}
|
||||
lease 10.3.0.2 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:02;
|
||||
}
|
||||
lease 10.3.0.3 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:03;
|
||||
}
|
||||
lease 10.3.0.4 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:04;
|
||||
}
|
||||
lease 10.3.0.5 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:05;
|
||||
}
|
||||
lease 10.3.0.6 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:06;
|
||||
}
|
||||
lease 10.3.0.7 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:07;
|
||||
}
|
||||
lease 10.3.0.8 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:08;
|
||||
}
|
||||
lease 10.3.0.9 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:09;
|
||||
}
|
||||
|
||||
lease 10.4.0.0 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:00;
|
||||
}
|
||||
lease 10.4.0.1 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:01;
|
||||
}
|
||||
lease 10.4.0.2 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:02;
|
||||
}
|
||||
lease 10.4.0.3 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:03;
|
||||
}
|
||||
lease 10.4.0.4 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:04;
|
||||
}
|
||||
lease 10.4.0.5 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:05;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue