+ dhcpd, clients: add more tests

This commit is contained in:
Simon Zolin
2019-06-26 17:53:05 +03:00
parent f1e6a30931
commit efaaeb58eb
2 changed files with 41 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",