From f5461323dbcc6d0624dc4bae5e0aa3d061752e60 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Mon, 8 Mar 2021 12:47:19 +0100 Subject: [PATCH] fix(run): run unattended short also on Windows (#242) We already have a short run unattended on macOS and we wanna do the same for Windows. See https://github.com/ooni/probe/issues/1377. --- cmd/ooniprobe/internal/cli/run/run.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/ooniprobe/internal/cli/run/run.go b/cmd/ooniprobe/internal/cli/run/run.go index 49d773f..5e8ca40 100644 --- a/cmd/ooniprobe/internal/cli/run/run.go +++ b/cmd/ooniprobe/internal/cli/run/run.go @@ -76,10 +76,11 @@ func init() { unattendedCmd := cmd.Command("unattended", "") unattendedCmd.Action(func(_ *kingpin.ParseContext) error { - if runtime.GOOS == "darwin" { - // Until we have enabled the check-in API we're called every - // hour on darwin and we need to self throttle. - // TODO(bassosimone): switch to check-in and remove this hack. + // Until we have enabled the check-in API we're called every + // hour on darwin and we need to self throttle. + // TODO(bassosimone): switch to check-in and remove this hack. + switch runtime.GOOS { + case "darwin", "windows": const veryFew = 10 probe.Config().Nettests.WebsitesURLLimit = veryFew }