Pull request 2256: 4923 Better interfaces
Updates #4923. Squashed commit of the following: commit 0e40b41aa1e517a62d6076c4e7a57c607792ef01 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Jul 10 15:28:16 2024 +0300 dhcpsvc: imp code, docs commit 5463fdde473f84caaca229b53027e8183d5c6bdc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Jul 9 20:31:20 2024 +0300 dhcpsvc: imp ifaces
This commit is contained in:
@@ -122,7 +122,7 @@ func TestNew(t *testing.T) {
|
||||
DBFilePath: leasesPath,
|
||||
},
|
||||
name: "gateway_within_range",
|
||||
wantErrMsg: `interface "eth0": ipv4: ` +
|
||||
wantErrMsg: `creating interfaces: interface "eth0": ipv4: ` +
|
||||
`gateway ip 192.168.0.100 in the ip range 192.168.0.1-192.168.0.254`,
|
||||
}, {
|
||||
conf: &dhcpsvc.Config{
|
||||
@@ -138,7 +138,7 @@ func TestNew(t *testing.T) {
|
||||
DBFilePath: leasesPath,
|
||||
},
|
||||
name: "bad_start",
|
||||
wantErrMsg: `interface "eth0": ipv4: ` +
|
||||
wantErrMsg: `creating interfaces: interface "eth0": ipv4: ` +
|
||||
`range start 127.0.0.1 is not within 192.168.0.1/24`,
|
||||
}}
|
||||
|
||||
@@ -568,5 +568,5 @@ func TestServer_Leases(t *testing.T) {
|
||||
HWAddr: mustParseMAC(t, "BB:BB:BB:BB:BB:BB"),
|
||||
IsStatic: true,
|
||||
}}
|
||||
assert.Equal(t, wantLeases, srv.Leases())
|
||||
assert.ElementsMatch(t, wantLeases, srv.Leases())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user