mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-10-26 11:27:18 +00:00
aghnet: imp tests
This commit is contained in:
parent
d7ff6a1fee
commit
92603fbe97
@ -51,6 +51,8 @@ func substNetInterfaceAddrs(tb testing.TB, f ifaceAddrsFunc) {
|
||||
}
|
||||
|
||||
func TestGatewayIP(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
const ifaceName = "ifaceName"
|
||||
const cmd = "ip route show dev " + ifaceName
|
||||
|
||||
@ -82,6 +84,8 @@ func TestGatewayIP(t *testing.T) {
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ctx := testutil.ContextWithTimeout(t, testTimeout)
|
||||
assert.Equal(t, tc.want, GatewayIP(ctx, tc.cmdCons, ifaceName))
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user