Pull request 2271: AGDNS-2374-slog-arpdb

Squashed commit of the following:

commit 355136e6e2f3e77b483d97fbc01fbef562c319eb
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Tue Aug 27 18:09:51 2024 +0300

    arpdb: imp docs

commit 27383833033216ab938b0896dbc39e5af8d4dde9
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Mon Aug 26 19:11:10 2024 +0300

    all: slog arpdb
This commit is contained in:
Stanislav Chzhen
2024-08-27 20:42:10 +03:00
parent 738958d90a
commit 0b8bf13453
8 changed files with 110 additions and 142 deletions

View File

@@ -9,6 +9,7 @@ import (
"testing"
"testing/fstest"
"github.com/AdguardTeam/golibs/logutil/slogutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -69,9 +70,10 @@ func TestCmdARPDB_linux(t *testing.T) {
t.Run("wrt", func(t *testing.T) {
a := &cmdARPDB{
parse: parseArpAWrt,
cmd: "arp",
args: []string{"-a"},
logger: slogutil.NewDiscardLogger(),
parse: parseArpAWrt,
cmd: "arp",
args: []string{"-a"},
ns: &neighs{
mu: &sync.RWMutex{},
ns: make([]Neighbor, 0),
@@ -86,9 +88,10 @@ func TestCmdARPDB_linux(t *testing.T) {
t.Run("ip_neigh", func(t *testing.T) {
a := &cmdARPDB{
parse: parseIPNeigh,
cmd: "ip",
args: []string{"neigh"},
logger: slogutil.NewDiscardLogger(),
parse: parseIPNeigh,
cmd: "ip",
args: []string{"neigh"},
ns: &neighs{
mu: &sync.RWMutex{},
ns: make([]Neighbor, 0),