aghnet: imp tests

This commit is contained in:
Stanislav Chzhen 2025-09-08 15:56:05 +03:00
parent d7ff6a1fee
commit 92603fbe97

View File

@ -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))
})