Pull request 1955: Upd libraries
Merge in DNS/adguard-home from upd-libs to master
Squashed commit of the following:
commit 72f4fb7d5ab8eaecb917a843dec56e3fa38b725c
Merge: 8defe106f 111005b8d
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Thu Aug 10 19:50:33 2023 +0300
Merge branch 'master' into upd-libs
commit 8defe106fc982ba916f42d5722f1cc0152042d04
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Thu Aug 10 19:38:01 2023 +0300
dnsforward: revert behavior
commit 8ccb2f675373772f8a6f829b80b317fda0c5f730
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Wed Aug 9 18:35:12 2023 +0300
all: imp code
commit a3112d3438a466bae515e56a6ee97394066ba481
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Wed Aug 9 17:26:52 2023 +0300
filtering: revert type
commit 56d2528fb4c8ee5504de0c6ec24050d63c8e6330
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Wed Aug 9 14:57:04 2023 +0300
stats: fix sort
commit 0dbb446602b7536df508a8e53c4a532455c9d064
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Wed Aug 9 14:52:28 2023 +0300
all: upd golibs & dnsproxy
This commit is contained in:
@@ -27,7 +27,7 @@ func TestChcker_getQuestion(t *testing.T) {
|
||||
hashes := hostnameToHashes("1.2.3.sub.host.com")
|
||||
assert.Len(t, hashes, 3)
|
||||
|
||||
hash := sha256.Sum256([]byte("3.sub.host.com"))
|
||||
hash := hostnameHash(sha256.Sum256([]byte("3.sub.host.com")))
|
||||
hexPref1 := hex.EncodeToString(hash[:prefixLen])
|
||||
assert.True(t, slices.Contains(hashes, hash))
|
||||
|
||||
@@ -105,7 +105,7 @@ func TestChecker_storeInCache(t *testing.T) {
|
||||
// store in cache hashes for "3.sub.host.com" and "host.com"
|
||||
// and empty data for hash-prefix for "sub.host.com"
|
||||
hashes := []hostnameHash{}
|
||||
hash := sha256.Sum256([]byte("sub.host.com"))
|
||||
hash := hostnameHash(sha256.Sum256([]byte("sub.host.com")))
|
||||
hashes = append(hashes, hash)
|
||||
var hashesArray []hostnameHash
|
||||
hash4 := sha256.Sum256([]byte("3.sub.host.com"))
|
||||
|
||||
Reference in New Issue
Block a user