- clients: fix incorrect info for clients from /etc/hosts
Close #1786 Squashed commit of the following: commit fc662252be38f20c9afda46fcb578efa50c9baf2 Author: Simon Zolin <s.zolin@adguard.com> Date: Thu Jun 11 10:57:26 2020 +0300 - clients: fix incorrect info for clients from /etc/hosts
This commit is contained in:
@@ -49,10 +49,9 @@ func TestAutoHostsResolution(t *testing.T) {
|
||||
|
||||
// Test hosts file
|
||||
table := ah.List()
|
||||
ips, _ = table["host"]
|
||||
assert.NotNil(t, ips)
|
||||
assert.Equal(t, 1, len(ips))
|
||||
assert.Equal(t, "127.0.0.1", ips[0].String())
|
||||
name, ok := table["127.0.0.1"]
|
||||
assert.True(t, ok)
|
||||
assert.Equal(t, "host", name)
|
||||
|
||||
// Test PTR
|
||||
a, _ := dns.ReverseAddr("127.0.0.1")
|
||||
|
||||
Reference in New Issue
Block a user