Pull request: all: less annoying pkg names

Merge in DNS/adguard-home from imp-naming to master

Squashed commit of the following:

commit d9e75c37af9a738384393735c141a41406d22eeb
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu May 13 15:52:14 2021 +0300

    all: less annoying pkg names
This commit is contained in:
Ainar Garipov
2021-05-21 16:15:47 +03:00
parent 42ec9cae76
commit 7f2f8de922
40 changed files with 207 additions and 207 deletions

View File

@@ -5,7 +5,7 @@ import (
"testing"
"time"
"github.com/AdguardTeam/AdGuardHome/internal/dnsfilter"
"github.com/AdguardTeam/AdGuardHome/internal/filtering"
"github.com/AdguardTeam/AdGuardHome/internal/querylog"
"github.com/AdguardTeam/AdGuardHome/internal/stats"
"github.com/AdguardTeam/dnsproxy/proxy"
@@ -52,7 +52,7 @@ func TestProcessQueryLogsAndStats(t *testing.T) {
wantLogProto querylog.ClientProto
wantStatClient string
wantCode resultCode
reason dnsfilter.Reason
reason filtering.Reason
wantStatResult stats.Result
}{{
name: "success_udp",
@@ -62,7 +62,7 @@ func TestProcessQueryLogsAndStats(t *testing.T) {
wantLogProto: "",
wantStatClient: "1.2.3.4",
wantCode: resultCodeSuccess,
reason: dnsfilter.NotFilteredNotFound,
reason: filtering.NotFilteredNotFound,
wantStatResult: stats.RNotFiltered,
}, {
name: "success_tls_client_id",
@@ -72,7 +72,7 @@ func TestProcessQueryLogsAndStats(t *testing.T) {
wantLogProto: querylog.ClientProtoDOT,
wantStatClient: "cli42",
wantCode: resultCodeSuccess,
reason: dnsfilter.NotFilteredNotFound,
reason: filtering.NotFilteredNotFound,
wantStatResult: stats.RNotFiltered,
}, {
name: "success_tls",
@@ -82,7 +82,7 @@ func TestProcessQueryLogsAndStats(t *testing.T) {
wantLogProto: querylog.ClientProtoDOT,
wantStatClient: "1.2.3.4",
wantCode: resultCodeSuccess,
reason: dnsfilter.NotFilteredNotFound,
reason: filtering.NotFilteredNotFound,
wantStatResult: stats.RNotFiltered,
}, {
name: "success_quic",
@@ -92,7 +92,7 @@ func TestProcessQueryLogsAndStats(t *testing.T) {
wantLogProto: querylog.ClientProtoDOQ,
wantStatClient: "1.2.3.4",
wantCode: resultCodeSuccess,
reason: dnsfilter.NotFilteredNotFound,
reason: filtering.NotFilteredNotFound,
wantStatResult: stats.RNotFiltered,
}, {
name: "success_https",
@@ -102,7 +102,7 @@ func TestProcessQueryLogsAndStats(t *testing.T) {
wantLogProto: querylog.ClientProtoDOH,
wantStatClient: "1.2.3.4",
wantCode: resultCodeSuccess,
reason: dnsfilter.NotFilteredNotFound,
reason: filtering.NotFilteredNotFound,
wantStatResult: stats.RNotFiltered,
}, {
name: "success_dnscrypt",
@@ -112,7 +112,7 @@ func TestProcessQueryLogsAndStats(t *testing.T) {
wantLogProto: querylog.ClientProtoDNSCrypt,
wantStatClient: "1.2.3.4",
wantCode: resultCodeSuccess,
reason: dnsfilter.NotFilteredNotFound,
reason: filtering.NotFilteredNotFound,
wantStatResult: stats.RNotFiltered,
}, {
name: "success_udp_filtered",
@@ -122,7 +122,7 @@ func TestProcessQueryLogsAndStats(t *testing.T) {
wantLogProto: "",
wantStatClient: "1.2.3.4",
wantCode: resultCodeSuccess,
reason: dnsfilter.FilteredBlockList,
reason: filtering.FilteredBlockList,
wantStatResult: stats.RFiltered,
}, {
name: "success_udp_sb",
@@ -132,7 +132,7 @@ func TestProcessQueryLogsAndStats(t *testing.T) {
wantLogProto: "",
wantStatClient: "1.2.3.4",
wantCode: resultCodeSuccess,
reason: dnsfilter.FilteredSafeBrowsing,
reason: filtering.FilteredSafeBrowsing,
wantStatResult: stats.RSafeBrowsing,
}, {
name: "success_udp_ss",
@@ -142,7 +142,7 @@ func TestProcessQueryLogsAndStats(t *testing.T) {
wantLogProto: "",
wantStatClient: "1.2.3.4",
wantCode: resultCodeSuccess,
reason: dnsfilter.FilteredSafeSearch,
reason: filtering.FilteredSafeSearch,
wantStatResult: stats.RSafeSearch,
}, {
name: "success_udp_pc",
@@ -152,7 +152,7 @@ func TestProcessQueryLogsAndStats(t *testing.T) {
wantLogProto: "",
wantStatClient: "1.2.3.4",
wantCode: resultCodeSuccess,
reason: dnsfilter.FilteredParental,
reason: filtering.FilteredParental,
wantStatResult: stats.RParental,
}}
@@ -183,7 +183,7 @@ func TestProcessQueryLogsAndStats(t *testing.T) {
},
proxyCtx: pctx,
startTime: time.Now(),
result: &dnsfilter.Result{
result: &filtering.Result{
Reason: tc.reason,
},
clientID: tc.clientID,