From 70d7c1a22c832c351b6a93148b010106fa472fd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Mon, 22 Mar 2021 14:31:50 +0100 Subject: [PATCH] Add signal to the im test group (#259) * Add signal to the im test group * fix(ipconfig_test.go): disable when running in CI Reference issue: https://github.com/ooni/probe/issues/1418 * fix(geolocate): remove unused variable Came across this while looking into this issue with the CI that is now failing. Guess fixing it here comes across as leaving the camp slightly less in a bad shape than how I found it. Co-authored-by: Simone Basso --- cmd/ooniprobe/internal/nettests/groups.go | 2 +- internal/engine/geolocate/ipconfig_test.go | 6 ++++++ internal/engine/geolocate/iplookup.go | 3 --- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cmd/ooniprobe/internal/nettests/groups.go b/cmd/ooniprobe/internal/nettests/groups.go index 5c4d9bc..2390432 100644 --- a/cmd/ooniprobe/internal/nettests/groups.go +++ b/cmd/ooniprobe/internal/nettests/groups.go @@ -37,6 +37,7 @@ var All = map[string]Group{ FacebookMessenger{}, Telegram{}, WhatsApp{}, + Signal{}, }, UnattendedOK: true, }, @@ -54,7 +55,6 @@ var All = map[string]Group{ Nettests: []Nettest{ DNSCheck{}, STUNReachability{}, - Signal{}, }, }, } diff --git a/internal/engine/geolocate/ipconfig_test.go b/internal/engine/geolocate/ipconfig_test.go index ed9b262..d9d6c9b 100644 --- a/internal/engine/geolocate/ipconfig_test.go +++ b/internal/engine/geolocate/ipconfig_test.go @@ -4,6 +4,7 @@ import ( "context" "net" "net/http" + "os" "testing" "github.com/apex/log" @@ -11,6 +12,11 @@ import ( ) func TestIPLookupWorksUsingIPConfig(t *testing.T) { + if os.Getenv("CI") == "true" { + // See https://github.com/ooni/probe-cli/pull/259/checks?check_run_id=2166066881#step:5:123 + // as well as https://github.com/ooni/probe/issues/1418. + t.Skip("This test does not work with GitHub Actions") + } ip, err := ipConfigIPLookup( context.Background(), http.DefaultClient, diff --git a/internal/engine/geolocate/iplookup.go b/internal/engine/geolocate/iplookup.go index acf0222..01462bd 100644 --- a/internal/engine/geolocate/iplookup.go +++ b/internal/engine/geolocate/iplookup.go @@ -7,7 +7,6 @@ import ( "math/rand" "net" "net/http" - "sync" "time" "github.com/ooni/probe-cli/v3/internal/engine/internal/multierror" @@ -61,8 +60,6 @@ var ( fn: ubuntuIPLookup, }, } - - once sync.Once ) type ipLookupClient struct {