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:
Sami Kerola 2017-11-26 15:14:49 +00:00
parent 2849dde21b
commit 447241e6c3
No known key found for this signature in database
GPG key ID: A9553245FDE9B739
33 changed files with 1059 additions and 51 deletions

241
tests/leases/binding-states Normal file
View 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;
}