fix(ipvanish): updater user agent to work again

This commit is contained in:
Quentin McGaw
2026-08-04 22:26:37 +00:00
parent 6f5fbab228
commit 297d6480d0
4 changed files with 22 additions and 3 deletions
@@ -195,12 +195,13 @@ func Test_Updater_GetServers(t *testing.T) {
unzipper := common.NewMockUnzipper(ctrl)
const zipURL = "https://configs.ipvanish.com/openvpn/v2.6.0-0/configs.zip"
unzipper.EXPECT().FetchAndExtract(ctx, zipURL).
// Context is wrapped with User-Agent for ipvanish, so use Any() for the ctx arg
unzipper.EXPECT().FetchAndExtract(gomock.Any(), zipURL). //nolint:dogsled
Return(testCase.unzipContents, testCase.unzipErr)
parallelResolver := common.NewMockParallelResolver(ctrl)
if testCase.expectResolve {
parallelResolver.EXPECT().Resolve(ctx, testCase.resolverSettings).
parallelResolver.EXPECT().Resolve(gomock.Any(), testCase.resolverSettings). //nolint:dogsled
Return(testCase.hostToIPs, testCase.resolveWarnings, testCase.resolveErr)
}