mirror of
https://git.vectorsigma.ru/public/AdGuardHome.git
synced 2026-08-03 20:49:21 +00:00
Merge in DNS/adguard-home from upd-all to master Squashed commit of the following: commit 72a41e9e2d9b9a5fbf24fa69322f9c4dcf3f5fb7 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 14 19:42:11 2025 +0300 specs: export tests commit aa729009306e492fd8a046b5e84f49be87e2a57f Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 14 19:19:54 2025 +0300 all: upd golibs commit 526ce744cfdf167d1e5b763422092e6f450993a6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 14 17:21:57 2025 +0300 all: upd scripts commit ecc4312764b31e8b84e462321e3690a9b8eebbf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 14 17:02:53 2025 +0300 all: upd go & tools
39 lines
767 B
Go
39 lines
767 B
Go
package home
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/AdguardTeam/AdGuardHome/internal/agh"
|
|
"github.com/AdguardTeam/AdGuardHome/internal/client"
|
|
"github.com/AdguardTeam/AdGuardHome/internal/filtering"
|
|
"github.com/AdguardTeam/golibs/testutil"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
// newClientsContainer is a helper that creates a new clients container for
|
|
// tests.
|
|
func newClientsContainer(tb testing.TB) (c *clientsContainer) {
|
|
tb.Helper()
|
|
|
|
c = &clientsContainer{}
|
|
|
|
ctx := testutil.ContextWithTimeout(tb, testTimeout)
|
|
err := c.Init(
|
|
ctx,
|
|
testLogger,
|
|
nil,
|
|
client.EmptyDHCP{},
|
|
nil,
|
|
nil,
|
|
&filtering.Config{
|
|
Logger: testLogger,
|
|
},
|
|
newSignalHandler(testLogger, nil, nil),
|
|
agh.EmptyConfigModifier{},
|
|
)
|
|
|
|
require.NoError(tb, err)
|
|
|
|
return c
|
|
}
|