Merge: + dhcpd, clients, dnsfilter: add more tests

#788

* commit '25da23497a19118a22b97d64749fa70337544116':
  + dnsfilter: more tests
  + dhcpd, clients: add more tests
This commit is contained in:
Simon Zolin
2019-07-01 19:26:27 +03:00
3 changed files with 56 additions and 4 deletions

View File

@@ -29,6 +29,16 @@ func TestClients(t *testing.T) {
t.Fatalf("clientAdd #2")
}
c, b = clientFind("1.1.1.1")
if !b || c.Name != "client1" {
t.Fatalf("clientFind #1")
}
c, b = clientFind("2.2.2.2")
if !b || c.Name != "client2" {
t.Fatalf("clientFind #2")
}
// failed add - name in use
c = Client{
IP: "1.2.3.5",