Pull request 2476: AGDNS-3086-aghnet-fix-darwin-tests

Squashed commit of the following:

commit e8003531dbbd21817403f28f86c1d85c305ebbdb
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Tue Sep 16 16:57:36 2025 +0300

    aghnet: fix darwin tests
This commit is contained in:
Stanislav Chzhen 2025-09-16 17:24:24 +03:00
parent f0ba20e17d
commit e4edbc30cc

View File

@ -81,7 +81,7 @@ func TestIfaceHasStaticIP(t *testing.T) {
}),
ifaceName: "en0",
wantHas: assert.False,
wantErrMsg: `can't get`,
wantErrMsg: `command "networksetup" failed: running: can't get: `,
}, {
name: "port_bad_output",
cmdCons: agh.NewMultipleCommandConstructor(agh.ExternalCommand{
@ -216,7 +216,7 @@ func TestIfaceSetStaticIP(t *testing.T) {
Code: 0,
}),
fsys: succFsys,
wantErrMsg: `can't set`,
wantErrMsg: `command "networksetup" failed: running: can't set: `,
}, {
name: "set_manual_error",
cmdCons: agh.NewMultipleCommandConstructor(agh.ExternalCommand{
@ -241,7 +241,7 @@ func TestIfaceSetStaticIP(t *testing.T) {
Code: 0,
}),
fsys: succFsys,
wantErrMsg: `can't set`,
wantErrMsg: `command "networksetup" failed: running: can't set: `,
}}
for _, tc := range testCases {