From 51990598aec5842654f450bac619f4aca1390937 Mon Sep 17 00:00:00 2001 From: decfox Date: Wed, 7 Aug 2024 00:30:09 +0530 Subject: [PATCH 1/3] refactor: remove dnscheck loader --- docs/design/dd-008-richer-input.md | 2 +- internal/registry/dnscheck.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/design/dd-008-richer-input.md b/docs/design/dd-008-richer-input.md index f0a53aaf4..469248a97 100644 --- a/docs/design/dd-008-richer-input.md +++ b/docs/design/dd-008-richer-input.md @@ -4,7 +4,7 @@ |--------------|------------------------------------------------| | Author | [@bassosimone](https://github.com/bassosimone) | | Last-Updated | 2024-07-02 | -| Reviewed-by | [@DecFox](https://github.com/DecFox | +| Reviewed-by | [@DecFox](https://github.com/DecFox) | | Status | living document | This document is a living document documenting our in-progress design diff --git a/internal/registry/dnscheck.go b/internal/registry/dnscheck.go index 009078aa6..2af708017 100644 --- a/internal/registry/dnscheck.go +++ b/internal/registry/dnscheck.go @@ -22,7 +22,6 @@ func init() { config: &dnscheck.Config{}, enabledByDefault: true, inputPolicy: model.InputOrStaticDefault, - newLoader: dnscheck.NewLoader, } } } From 41b400e63ed342bb01c5340976aaa4c89b710a84 Mon Sep 17 00:00:00 2001 From: decfox Date: Wed, 7 Aug 2024 01:21:45 +0530 Subject: [PATCH 2/3] fix: change ams-pg to backend-hel --- internal/engine/inputloader_integration_test.go | 2 +- internal/engine/session_integration_test.go | 8 ++++---- .../experiment/webconnectivity/webconnectivity_test.go | 2 +- internal/probeservices/checkin_test.go | 2 +- internal/probeservices/probeservices_test.go | 2 +- pkg/oonimkall/session_integration_test.go | 2 +- pkg/oonimkall/webconnectivity_test.go | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/engine/inputloader_integration_test.go b/internal/engine/inputloader_integration_test.go index 31b21a33a..23b1e99b5 100644 --- a/internal/engine/inputloader_integration_test.go +++ b/internal/engine/inputloader_integration_test.go @@ -23,7 +23,7 @@ func TestTargetLoaderInputOrQueryBackendWithNoInput(t *testing.T) { } sess, err := engine.NewSession(context.Background(), engine.SessionConfig{ AvailableProbeServices: []model.OOAPIService{{ - Address: "https://ams-pg-test.ooni.org/", + Address: "https://backend-hel.ooni.org/", Type: "https", }}, KVStore: &kvstore.Memory{}, diff --git a/internal/engine/session_integration_test.go b/internal/engine/session_integration_test.go index 9f211e930..a14445d1a 100644 --- a/internal/engine/session_integration_test.go +++ b/internal/engine/session_integration_test.go @@ -94,7 +94,7 @@ func TestSessionTorArgsTorBinary(t *testing.T) { } sess, err := NewSession(context.Background(), SessionConfig{ AvailableProbeServices: []model.OOAPIService{{ - Address: "https://ams-pg-test.ooni.org", + Address: "https://backend-hel.ooni.org", Type: "https", }}, Logger: model.DiscardLogger, @@ -126,7 +126,7 @@ func TestSessionTorArgsTorBinary(t *testing.T) { func newSessionForTestingNoLookupsWithProxyURL(t *testing.T, URL *url.URL) *Session { sess, err := NewSession(context.Background(), SessionConfig{ AvailableProbeServices: []model.OOAPIService{{ - Address: "https://ams-pg-test.ooni.org", + Address: "https://backend-hel.ooni.org", Type: "https", }}, Logger: model.DiscardLogger, @@ -179,7 +179,7 @@ func TestInitOrchestraClientMaybeRegisterError(t *testing.T) { sess := newSessionForTestingNoLookups(t) defer sess.Close() clnt, err := probeservices.NewClient(sess, model.OOAPIService{ - Address: "https://ams-pg-test.ooni.org/", + Address: "https://backend-hel.ooni.org/", Type: "https", }) if err != nil { @@ -204,7 +204,7 @@ func TestInitOrchestraClientMaybeLoginError(t *testing.T) { sess := newSessionForTestingNoLookups(t) defer sess.Close() clnt, err := probeservices.NewClient(sess, model.OOAPIService{ - Address: "https://ams-pg-test.ooni.org/", + Address: "https://backend-hel.ooni.org/", Type: "https", }) if err != nil { diff --git a/internal/experiment/webconnectivity/webconnectivity_test.go b/internal/experiment/webconnectivity/webconnectivity_test.go index cfdccd398..a94d0bab5 100644 --- a/internal/experiment/webconnectivity/webconnectivity_test.go +++ b/internal/experiment/webconnectivity/webconnectivity_test.go @@ -225,7 +225,7 @@ func TestMeasureWithNoAvailableTestHelpers(t *testing.T) { func newsession(t *testing.T, lookupBackends bool) model.ExperimentSession { sess, err := engine.NewSession(context.Background(), engine.SessionConfig{ AvailableProbeServices: []model.OOAPIService{{ - Address: "https://ams-pg-test.ooni.org", + Address: "https://backend-hel.ooni.org", Type: "https", }}, Logger: log.Log, diff --git a/internal/probeservices/checkin_test.go b/internal/probeservices/checkin_test.go index 867c2a309..f83f7d3a4 100644 --- a/internal/probeservices/checkin_test.go +++ b/internal/probeservices/checkin_test.go @@ -42,7 +42,7 @@ func TestCheckIn(t *testing.T) { } client := newclient() - client.BaseURL = "https://ams-pg-test.ooni.org" // use the test infra + client.BaseURL = "https://backend-hel.ooni.org" // use the test infra ctx := context.Background() diff --git a/internal/probeservices/probeservices_test.go b/internal/probeservices/probeservices_test.go index 5f31d75c8..f36198675 100644 --- a/internal/probeservices/probeservices_test.go +++ b/internal/probeservices/probeservices_test.go @@ -23,7 +23,7 @@ func newclient() *Client { MockableLogger: log.Log, }, model.OOAPIService{ - Address: "https://ams-pg-test.ooni.org/", + Address: "https://backend-hel.ooni.org/", Type: "https", }, ) diff --git a/pkg/oonimkall/session_integration_test.go b/pkg/oonimkall/session_integration_test.go index 9fbf39bbd..27399aba2 100644 --- a/pkg/oonimkall/session_integration_test.go +++ b/pkg/oonimkall/session_integration_test.go @@ -21,7 +21,7 @@ func NewSessionForTestingWithAssetsDir(assetsDir string) (*oonimkall.Session, er return oonimkall.NewSession(&oonimkall.SessionConfig{ AssetsDir: assetsDir, Logger: log.Log, - ProbeServicesURL: "https://ams-pg-test.ooni.org/", + ProbeServicesURL: "https://backend-hel.ooni.org/", SoftwareName: "oonimkall-test", SoftwareVersion: "0.1.0", StateDir: "../testdata/oonimkall/state", diff --git a/pkg/oonimkall/webconnectivity_test.go b/pkg/oonimkall/webconnectivity_test.go index a3c16650e..d8c05a28f 100644 --- a/pkg/oonimkall/webconnectivity_test.go +++ b/pkg/oonimkall/webconnectivity_test.go @@ -156,7 +156,7 @@ func TestWebConnectivityRunnerWithNoError(t *testing.T) { func TestWebConnectivityRunWithCancelledContext(t *testing.T) { sess, err := NewSession(&SessionConfig{ AssetsDir: "../testdata/oonimkall/assets", - ProbeServicesURL: "https://ams-pg-test.ooni.org/", + ProbeServicesURL: "https://backend-hel.ooni.org/", SoftwareName: "oonimkall-test", SoftwareVersion: "0.1.0", StateDir: "../testdata/oonimkall/state", From d887234dfa619c1dd3be7f61d265f66d0537f1c1 Mon Sep 17 00:00:00 2001 From: decfox Date: Wed, 7 Aug 2024 01:43:34 +0530 Subject: [PATCH 3/3] fix: add TODO for failing test --- internal/engine/inputloader_integration_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/engine/inputloader_integration_test.go b/internal/engine/inputloader_integration_test.go index 23b1e99b5..7d33bd0c8 100644 --- a/internal/engine/inputloader_integration_test.go +++ b/internal/engine/inputloader_integration_test.go @@ -42,6 +42,8 @@ func TestTargetLoaderInputOrQueryBackendWithNoInput(t *testing.T) { } ctx := context.Background() out, err := il.Load(ctx) + // TODO(decfox): it seems `backend-hel.ooni.org` returns a different response + // than intended which is why the test fails. if err != nil { t.Fatal(err) }