From 58adb68b2c8878e656ef973c3ef58f5716c5c557 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Thu, 2 Jun 2022 00:50:55 +0200 Subject: [PATCH] refactor: move tracex outside of engine/netx (#782) * refactor: move tracex outside of engine/netx Consistently with https://github.com/ooni/probe/issues/2121 and https://github.com/ooni/probe/issues/2115, we can now move tracex outside of engine/netx. The main reason why this makes sense now is that the package is now changed significantly from the one that we imported from ooni/probe-engine. We have improved its implementation, which had not been touched significantly for quite some time, and converted it to unit testing. I will document tomorrow some extra work I'd like to do with this package but likely could not do $soon. * go fmt * regen tutorials --- internal/cmd/oohelperd/internal/webconnectivity/dns.go | 2 +- internal/cmd/oohelperd/internal/webconnectivity/http.go | 2 +- internal/engine/experiment/dash/dash.go | 2 +- internal/engine/experiment/dash/dash_test.go | 2 +- internal/engine/experiment/dnscheck/dnscheck.go | 2 +- internal/engine/experiment/fbmessenger/fbmessenger_test.go | 2 +- internal/engine/experiment/hhfm/hhfm.go | 2 +- internal/engine/experiment/hhfm/hhfm_test.go | 2 +- internal/engine/experiment/hirl/hirl.go | 2 +- internal/engine/experiment/hirl/hirl_test.go | 2 +- internal/engine/experiment/quicping/quicping.go | 2 +- internal/engine/experiment/riseupvpn/riseupvpn.go | 2 +- internal/engine/experiment/riseupvpn/riseupvpn_test.go | 2 +- internal/engine/experiment/stunreachability/stunreachability.go | 2 +- internal/engine/experiment/tlstool/tlstool.go | 2 +- internal/engine/experiment/tor/tor.go | 2 +- internal/engine/experiment/torsf/torsf.go | 2 +- internal/engine/experiment/urlgetter/configurer.go | 2 +- internal/engine/experiment/urlgetter/configurer_test.go | 2 +- internal/engine/experiment/urlgetter/getter.go | 2 +- internal/engine/experiment/urlgetter/urlgetter.go | 2 +- internal/engine/experiment/vanillator/vanillator.go | 2 +- internal/engine/experiment/webconnectivity/httpanalysis_test.go | 2 +- internal/engine/experiment/webconnectivity/summary_test.go | 2 +- internal/engine/experiment/webconnectivity/webconnectivity.go | 2 +- .../engine/experiment/webconnectivity/webconnectivity_test.go | 2 +- internal/engine/netx/dialer/dialer.go | 2 +- internal/engine/netx/dialer/dialer_test.go | 2 +- internal/engine/netx/integration_test.go | 2 +- internal/engine/netx/netx.go | 2 +- internal/engine/netx/netx_test.go | 2 +- internal/{engine/netx => }/tracex/archival.go | 0 internal/{engine/netx => }/tracex/archival_test.go | 0 internal/{engine/netx => }/tracex/dialer.go | 0 internal/{engine/netx => }/tracex/dialer_test.go | 0 internal/{engine/netx => }/tracex/doc.go | 0 internal/{engine/netx => }/tracex/event.go | 0 internal/{engine/netx => }/tracex/http.go | 0 internal/{engine/netx => }/tracex/http_test.go | 0 internal/{engine/netx => }/tracex/quic.go | 0 internal/{engine/netx => }/tracex/quic_test.go | 0 internal/{engine/netx => }/tracex/resolver.go | 0 internal/{engine/netx => }/tracex/resolver_test.go | 0 internal/{engine/netx => }/tracex/saver.go | 0 internal/{engine/netx => }/tracex/saver_test.go | 0 internal/{engine/netx => }/tracex/tls.go | 0 internal/{engine/netx => }/tracex/tls_test.go | 0 internal/tutorial/experiment/torsf/chapter04/README.md | 2 +- internal/tutorial/experiment/torsf/chapter04/torsf.go | 2 +- internal/tutorial/netxlite/chapter06/README.md | 2 +- 50 files changed, 34 insertions(+), 34 deletions(-) rename internal/{engine/netx => }/tracex/archival.go (100%) rename internal/{engine/netx => }/tracex/archival_test.go (100%) rename internal/{engine/netx => }/tracex/dialer.go (100%) rename internal/{engine/netx => }/tracex/dialer_test.go (100%) rename internal/{engine/netx => }/tracex/doc.go (100%) rename internal/{engine/netx => }/tracex/event.go (100%) rename internal/{engine/netx => }/tracex/http.go (100%) rename internal/{engine/netx => }/tracex/http_test.go (100%) rename internal/{engine/netx => }/tracex/quic.go (100%) rename internal/{engine/netx => }/tracex/quic_test.go (100%) rename internal/{engine/netx => }/tracex/resolver.go (100%) rename internal/{engine/netx => }/tracex/resolver_test.go (100%) rename internal/{engine/netx => }/tracex/saver.go (100%) rename internal/{engine/netx => }/tracex/saver_test.go (100%) rename internal/{engine/netx => }/tracex/tls.go (100%) rename internal/{engine/netx => }/tracex/tls_test.go (100%) diff --git a/internal/cmd/oohelperd/internal/webconnectivity/dns.go b/internal/cmd/oohelperd/internal/webconnectivity/dns.go index 0327cac734..8faaf60d3f 100644 --- a/internal/cmd/oohelperd/internal/webconnectivity/dns.go +++ b/internal/cmd/oohelperd/internal/webconnectivity/dns.go @@ -5,9 +5,9 @@ import ( "sync" "github.com/ooni/probe-cli/v3/internal/engine/experiment/webconnectivity" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) // newfailure is a convenience shortcut to save typing diff --git a/internal/cmd/oohelperd/internal/webconnectivity/http.go b/internal/cmd/oohelperd/internal/webconnectivity/http.go index 95149cb4f7..d98710f33b 100644 --- a/internal/cmd/oohelperd/internal/webconnectivity/http.go +++ b/internal/cmd/oohelperd/internal/webconnectivity/http.go @@ -8,8 +8,8 @@ import ( "sync" "github.com/ooni/probe-cli/v3/internal/engine/experiment/webconnectivity" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) // CtrlHTTPResponse is the result of the HTTP check performed by diff --git a/internal/engine/experiment/dash/dash.go b/internal/engine/experiment/dash/dash.go index ee36b8fcc9..90151042cc 100644 --- a/internal/engine/experiment/dash/dash.go +++ b/internal/engine/experiment/dash/dash.go @@ -15,10 +15,10 @@ import ( "github.com/montanaflynn/stats" "github.com/ooni/probe-cli/v3/internal/engine/netx" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/humanize" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) const ( diff --git a/internal/engine/experiment/dash/dash_test.go b/internal/engine/experiment/dash/dash_test.go index 0a8e0f3363..7b5addc994 100644 --- a/internal/engine/experiment/dash/dash_test.go +++ b/internal/engine/experiment/dash/dash_test.go @@ -12,8 +12,8 @@ import ( "github.com/apex/log" "github.com/montanaflynn/stats" "github.com/ooni/probe-cli/v3/internal/engine/mockable" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" + "github.com/ooni/probe-cli/v3/internal/tracex" ) func TestRunnerLoopLocateFailure(t *testing.T) { diff --git a/internal/engine/experiment/dnscheck/dnscheck.go b/internal/engine/experiment/dnscheck/dnscheck.go index b0e41d609b..ed4ded3923 100644 --- a/internal/engine/experiment/dnscheck/dnscheck.go +++ b/internal/engine/experiment/dnscheck/dnscheck.go @@ -16,9 +16,9 @@ import ( "github.com/ooni/probe-cli/v3/internal/atomicx" "github.com/ooni/probe-cli/v3/internal/engine/experiment/urlgetter" "github.com/ooni/probe-cli/v3/internal/engine/netx" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/runtimex" + "github.com/ooni/probe-cli/v3/internal/tracex" ) const ( diff --git a/internal/engine/experiment/fbmessenger/fbmessenger_test.go b/internal/engine/experiment/fbmessenger/fbmessenger_test.go index a2d1df57ac..0545cd437a 100644 --- a/internal/engine/experiment/fbmessenger/fbmessenger_test.go +++ b/internal/engine/experiment/fbmessenger/fbmessenger_test.go @@ -10,9 +10,9 @@ import ( "github.com/ooni/probe-cli/v3/internal/engine/experiment/fbmessenger" "github.com/ooni/probe-cli/v3/internal/engine/experiment/urlgetter" "github.com/ooni/probe-cli/v3/internal/engine/mockable" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) func TestNewExperimentMeasurer(t *testing.T) { diff --git a/internal/engine/experiment/hhfm/hhfm.go b/internal/engine/experiment/hhfm/hhfm.go index bd7808cb51..574cfbdfda 100644 --- a/internal/engine/experiment/hhfm/hhfm.go +++ b/internal/engine/experiment/hhfm/hhfm.go @@ -15,10 +15,10 @@ import ( "time" "github.com/ooni/probe-cli/v3/internal/engine/experiment/urlgetter" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" "github.com/ooni/probe-cli/v3/internal/randx" + "github.com/ooni/probe-cli/v3/internal/tracex" ) const ( diff --git a/internal/engine/experiment/hhfm/hhfm_test.go b/internal/engine/experiment/hhfm/hhfm_test.go index 7dd9e243bb..4d95f70636 100644 --- a/internal/engine/experiment/hhfm/hhfm_test.go +++ b/internal/engine/experiment/hhfm/hhfm_test.go @@ -16,9 +16,9 @@ import ( "github.com/ooni/probe-cli/v3/internal/engine/experiment/hhfm" "github.com/ooni/probe-cli/v3/internal/engine/experiment/urlgetter" "github.com/ooni/probe-cli/v3/internal/engine/mockable" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) func TestNewExperimentMeasurer(t *testing.T) { diff --git a/internal/engine/experiment/hirl/hirl.go b/internal/engine/experiment/hirl/hirl.go index 60d823377a..6cc3517c96 100644 --- a/internal/engine/experiment/hirl/hirl.go +++ b/internal/engine/experiment/hirl/hirl.go @@ -12,10 +12,10 @@ import ( "time" "github.com/ooni/probe-cli/v3/internal/engine/netx" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" "github.com/ooni/probe-cli/v3/internal/randx" + "github.com/ooni/probe-cli/v3/internal/tracex" ) const ( diff --git a/internal/engine/experiment/hirl/hirl_test.go b/internal/engine/experiment/hirl/hirl_test.go index f71207a0a9..1299307d2a 100644 --- a/internal/engine/experiment/hirl/hirl_test.go +++ b/internal/engine/experiment/hirl/hirl_test.go @@ -10,9 +10,9 @@ import ( "github.com/ooni/probe-cli/v3/internal/engine/experiment/hirl" "github.com/ooni/probe-cli/v3/internal/engine/mockable" "github.com/ooni/probe-cli/v3/internal/engine/netx" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) func TestNewExperimentMeasurer(t *testing.T) { diff --git a/internal/engine/experiment/quicping/quicping.go b/internal/engine/experiment/quicping/quicping.go index 6859877333..f5c5c315e0 100644 --- a/internal/engine/experiment/quicping/quicping.go +++ b/internal/engine/experiment/quicping/quicping.go @@ -17,9 +17,9 @@ import ( _ "crypto/sha256" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) // A connectionID in QUIC diff --git a/internal/engine/experiment/riseupvpn/riseupvpn.go b/internal/engine/experiment/riseupvpn/riseupvpn.go index 5de22401af..62dd7e3304 100644 --- a/internal/engine/experiment/riseupvpn/riseupvpn.go +++ b/internal/engine/experiment/riseupvpn/riseupvpn.go @@ -10,9 +10,9 @@ import ( "time" "github.com/ooni/probe-cli/v3/internal/engine/experiment/urlgetter" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) const ( diff --git a/internal/engine/experiment/riseupvpn/riseupvpn_test.go b/internal/engine/experiment/riseupvpn/riseupvpn_test.go index 793cb55e99..0e6754177e 100644 --- a/internal/engine/experiment/riseupvpn/riseupvpn_test.go +++ b/internal/engine/experiment/riseupvpn/riseupvpn_test.go @@ -15,9 +15,9 @@ import ( "github.com/ooni/probe-cli/v3/internal/engine/experiment/riseupvpn" "github.com/ooni/probe-cli/v3/internal/engine/experiment/urlgetter" "github.com/ooni/probe-cli/v3/internal/engine/mockable" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) const ( diff --git a/internal/engine/experiment/stunreachability/stunreachability.go b/internal/engine/experiment/stunreachability/stunreachability.go index e4c18d0370..8dbe046287 100644 --- a/internal/engine/experiment/stunreachability/stunreachability.go +++ b/internal/engine/experiment/stunreachability/stunreachability.go @@ -12,9 +12,9 @@ import ( "time" "github.com/ooni/probe-cli/v3/internal/engine/netx" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" "github.com/pion/stun" ) diff --git a/internal/engine/experiment/tlstool/tlstool.go b/internal/engine/experiment/tlstool/tlstool.go index 6188db1aea..812d081e98 100644 --- a/internal/engine/experiment/tlstool/tlstool.go +++ b/internal/engine/experiment/tlstool/tlstool.go @@ -17,9 +17,9 @@ import ( "github.com/ooni/probe-cli/v3/internal/engine/experiment/tlstool/internal" "github.com/ooni/probe-cli/v3/internal/engine/netx" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/runtimex" + "github.com/ooni/probe-cli/v3/internal/tracex" ) const ( diff --git a/internal/engine/experiment/tor/tor.go b/internal/engine/experiment/tor/tor.go index a60be9de38..19c8f506d3 100644 --- a/internal/engine/experiment/tor/tor.go +++ b/internal/engine/experiment/tor/tor.go @@ -13,12 +13,12 @@ import ( "time" "github.com/ooni/probe-cli/v3/internal/atomicx" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/measurex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" "github.com/ooni/probe-cli/v3/internal/runtimex" "github.com/ooni/probe-cli/v3/internal/scrubber" + "github.com/ooni/probe-cli/v3/internal/tracex" ) const ( diff --git a/internal/engine/experiment/torsf/torsf.go b/internal/engine/experiment/torsf/torsf.go index 7675eb11c0..aef0f823cf 100644 --- a/internal/engine/experiment/torsf/torsf.go +++ b/internal/engine/experiment/torsf/torsf.go @@ -11,11 +11,11 @@ import ( "time" "github.com/ooni/probe-cli/v3/internal/bytecounter" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/ptx" "github.com/ooni/probe-cli/v3/internal/runtimex" "github.com/ooni/probe-cli/v3/internal/torlogs" + "github.com/ooni/probe-cli/v3/internal/tracex" "github.com/ooni/probe-cli/v3/internal/tunnel" ) diff --git a/internal/engine/experiment/urlgetter/configurer.go b/internal/engine/experiment/urlgetter/configurer.go index a1bf443d82..cc4b2eb570 100644 --- a/internal/engine/experiment/urlgetter/configurer.go +++ b/internal/engine/experiment/urlgetter/configurer.go @@ -9,9 +9,9 @@ import ( "strings" "github.com/ooni/probe-cli/v3/internal/engine/netx" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) // The Configurer job is to construct a Configuration that can diff --git a/internal/engine/experiment/urlgetter/configurer_test.go b/internal/engine/experiment/urlgetter/configurer_test.go index bc3ff2ab7d..886476eec6 100644 --- a/internal/engine/experiment/urlgetter/configurer_test.go +++ b/internal/engine/experiment/urlgetter/configurer_test.go @@ -9,8 +9,8 @@ import ( "github.com/apex/log" "github.com/ooni/probe-cli/v3/internal/engine/experiment/urlgetter" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) func TestConfigurerNewConfigurationVanilla(t *testing.T) { diff --git a/internal/engine/experiment/urlgetter/getter.go b/internal/engine/experiment/urlgetter/getter.go index 84de6fa800..e002211cab 100644 --- a/internal/engine/experiment/urlgetter/getter.go +++ b/internal/engine/experiment/urlgetter/getter.go @@ -6,9 +6,9 @@ import ( "net/url" "time" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" "github.com/ooni/probe-cli/v3/internal/tunnel" ) diff --git a/internal/engine/experiment/urlgetter/urlgetter.go b/internal/engine/experiment/urlgetter/urlgetter.go index c9ffbe651f..afd8ffedfc 100644 --- a/internal/engine/experiment/urlgetter/urlgetter.go +++ b/internal/engine/experiment/urlgetter/urlgetter.go @@ -8,8 +8,8 @@ import ( "crypto/x509" "time" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" + "github.com/ooni/probe-cli/v3/internal/tracex" ) const ( diff --git a/internal/engine/experiment/vanillator/vanillator.go b/internal/engine/experiment/vanillator/vanillator.go index d16c9b0c3c..593f07c9b1 100644 --- a/internal/engine/experiment/vanillator/vanillator.go +++ b/internal/engine/experiment/vanillator/vanillator.go @@ -10,10 +10,10 @@ import ( "path" "time" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/runtimex" "github.com/ooni/probe-cli/v3/internal/torlogs" + "github.com/ooni/probe-cli/v3/internal/tracex" "github.com/ooni/probe-cli/v3/internal/tunnel" ) diff --git a/internal/engine/experiment/webconnectivity/httpanalysis_test.go b/internal/engine/experiment/webconnectivity/httpanalysis_test.go index 62b630fc4e..482f7f86a4 100644 --- a/internal/engine/experiment/webconnectivity/httpanalysis_test.go +++ b/internal/engine/experiment/webconnectivity/httpanalysis_test.go @@ -6,8 +6,8 @@ import ( "github.com/google/go-cmp/cmp" "github.com/ooni/probe-cli/v3/internal/engine/experiment/urlgetter" "github.com/ooni/probe-cli/v3/internal/engine/experiment/webconnectivity" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/randx" + "github.com/ooni/probe-cli/v3/internal/tracex" ) func TestHTTPBodyLengthChecks(t *testing.T) { diff --git a/internal/engine/experiment/webconnectivity/summary_test.go b/internal/engine/experiment/webconnectivity/summary_test.go index f1f64879e4..bcde99e78d 100644 --- a/internal/engine/experiment/webconnectivity/summary_test.go +++ b/internal/engine/experiment/webconnectivity/summary_test.go @@ -6,8 +6,8 @@ import ( "github.com/google/go-cmp/cmp" "github.com/ooni/probe-cli/v3/internal/engine/experiment/webconnectivity" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) func TestSummarize(t *testing.T) { diff --git a/internal/engine/experiment/webconnectivity/webconnectivity.go b/internal/engine/experiment/webconnectivity/webconnectivity.go index f0a2556b33..526b9f7765 100644 --- a/internal/engine/experiment/webconnectivity/webconnectivity.go +++ b/internal/engine/experiment/webconnectivity/webconnectivity.go @@ -9,8 +9,8 @@ import ( "time" "github.com/ooni/probe-cli/v3/internal/engine/experiment/webconnectivity/internal" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" + "github.com/ooni/probe-cli/v3/internal/tracex" ) const ( diff --git a/internal/engine/experiment/webconnectivity/webconnectivity_test.go b/internal/engine/experiment/webconnectivity/webconnectivity_test.go index fc47da855e..c1fcb37b50 100644 --- a/internal/engine/experiment/webconnectivity/webconnectivity_test.go +++ b/internal/engine/experiment/webconnectivity/webconnectivity_test.go @@ -11,9 +11,9 @@ import ( "github.com/google/go-cmp/cmp" engine "github.com/ooni/probe-cli/v3/internal/engine" "github.com/ooni/probe-cli/v3/internal/engine/experiment/webconnectivity" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) func TestNewExperimentMeasurer(t *testing.T) { diff --git a/internal/engine/netx/dialer/dialer.go b/internal/engine/netx/dialer/dialer.go index d385f3869b..cf896e284d 100644 --- a/internal/engine/netx/dialer/dialer.go +++ b/internal/engine/netx/dialer/dialer.go @@ -7,9 +7,9 @@ import ( "net/url" "github.com/ooni/probe-cli/v3/internal/bytecounter" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) // Config contains the settings for New. diff --git a/internal/engine/netx/dialer/dialer_test.go b/internal/engine/netx/dialer/dialer_test.go index ff2da14177..44eca7687d 100644 --- a/internal/engine/netx/dialer/dialer_test.go +++ b/internal/engine/netx/dialer/dialer_test.go @@ -7,8 +7,8 @@ import ( "github.com/apex/log" "github.com/ooni/probe-cli/v3/internal/bytecounter" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) func TestNewCreatesTheExpectedChain(t *testing.T) { diff --git a/internal/engine/netx/integration_test.go b/internal/engine/netx/integration_test.go index 203401ed4d..19e8dba86b 100644 --- a/internal/engine/netx/integration_test.go +++ b/internal/engine/netx/integration_test.go @@ -9,8 +9,8 @@ import ( "github.com/apex/log" "github.com/ooni/probe-cli/v3/internal/bytecounter" "github.com/ooni/probe-cli/v3/internal/engine/netx" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) func TestSuccess(t *testing.T) { diff --git a/internal/engine/netx/netx.go b/internal/engine/netx/netx.go index 29ae609ee9..8d80a82496 100644 --- a/internal/engine/netx/netx.go +++ b/internal/engine/netx/netx.go @@ -34,9 +34,9 @@ import ( "github.com/ooni/probe-cli/v3/internal/engine/netx/dialer" "github.com/ooni/probe-cli/v3/internal/engine/netx/httptransport" "github.com/ooni/probe-cli/v3/internal/engine/netx/resolver" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) // Config contains configuration for creating a new transport. When any diff --git a/internal/engine/netx/netx_test.go b/internal/engine/netx/netx_test.go index 8a454fe6e4..e159aa569a 100644 --- a/internal/engine/netx/netx_test.go +++ b/internal/engine/netx/netx_test.go @@ -13,9 +13,9 @@ import ( "github.com/ooni/probe-cli/v3/internal/bytecounter" "github.com/ooni/probe-cli/v3/internal/engine/netx" "github.com/ooni/probe-cli/v3/internal/engine/netx/resolver" - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" "github.com/ooni/probe-cli/v3/internal/model/mocks" "github.com/ooni/probe-cli/v3/internal/netxlite" + "github.com/ooni/probe-cli/v3/internal/tracex" ) func TestNewResolverVanilla(t *testing.T) { diff --git a/internal/engine/netx/tracex/archival.go b/internal/tracex/archival.go similarity index 100% rename from internal/engine/netx/tracex/archival.go rename to internal/tracex/archival.go diff --git a/internal/engine/netx/tracex/archival_test.go b/internal/tracex/archival_test.go similarity index 100% rename from internal/engine/netx/tracex/archival_test.go rename to internal/tracex/archival_test.go diff --git a/internal/engine/netx/tracex/dialer.go b/internal/tracex/dialer.go similarity index 100% rename from internal/engine/netx/tracex/dialer.go rename to internal/tracex/dialer.go diff --git a/internal/engine/netx/tracex/dialer_test.go b/internal/tracex/dialer_test.go similarity index 100% rename from internal/engine/netx/tracex/dialer_test.go rename to internal/tracex/dialer_test.go diff --git a/internal/engine/netx/tracex/doc.go b/internal/tracex/doc.go similarity index 100% rename from internal/engine/netx/tracex/doc.go rename to internal/tracex/doc.go diff --git a/internal/engine/netx/tracex/event.go b/internal/tracex/event.go similarity index 100% rename from internal/engine/netx/tracex/event.go rename to internal/tracex/event.go diff --git a/internal/engine/netx/tracex/http.go b/internal/tracex/http.go similarity index 100% rename from internal/engine/netx/tracex/http.go rename to internal/tracex/http.go diff --git a/internal/engine/netx/tracex/http_test.go b/internal/tracex/http_test.go similarity index 100% rename from internal/engine/netx/tracex/http_test.go rename to internal/tracex/http_test.go diff --git a/internal/engine/netx/tracex/quic.go b/internal/tracex/quic.go similarity index 100% rename from internal/engine/netx/tracex/quic.go rename to internal/tracex/quic.go diff --git a/internal/engine/netx/tracex/quic_test.go b/internal/tracex/quic_test.go similarity index 100% rename from internal/engine/netx/tracex/quic_test.go rename to internal/tracex/quic_test.go diff --git a/internal/engine/netx/tracex/resolver.go b/internal/tracex/resolver.go similarity index 100% rename from internal/engine/netx/tracex/resolver.go rename to internal/tracex/resolver.go diff --git a/internal/engine/netx/tracex/resolver_test.go b/internal/tracex/resolver_test.go similarity index 100% rename from internal/engine/netx/tracex/resolver_test.go rename to internal/tracex/resolver_test.go diff --git a/internal/engine/netx/tracex/saver.go b/internal/tracex/saver.go similarity index 100% rename from internal/engine/netx/tracex/saver.go rename to internal/tracex/saver.go diff --git a/internal/engine/netx/tracex/saver_test.go b/internal/tracex/saver_test.go similarity index 100% rename from internal/engine/netx/tracex/saver_test.go rename to internal/tracex/saver_test.go diff --git a/internal/engine/netx/tracex/tls.go b/internal/tracex/tls.go similarity index 100% rename from internal/engine/netx/tracex/tls.go rename to internal/tracex/tls.go diff --git a/internal/engine/netx/tracex/tls_test.go b/internal/tracex/tls_test.go similarity index 100% rename from internal/engine/netx/tracex/tls_test.go rename to internal/tracex/tls_test.go diff --git a/internal/tutorial/experiment/torsf/chapter04/README.md b/internal/tutorial/experiment/torsf/chapter04/README.md index 1fd8fbc876..b90dd53bed 100644 --- a/internal/tutorial/experiment/torsf/chapter04/README.md +++ b/internal/tutorial/experiment/torsf/chapter04/README.md @@ -38,7 +38,7 @@ The `tracex` package contains code used to format internal measurements representations to the OONI data format. ```Go - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" + "github.com/ooni/probe-cli/v3/internal/tracex" ``` diff --git a/internal/tutorial/experiment/torsf/chapter04/torsf.go b/internal/tutorial/experiment/torsf/chapter04/torsf.go index 1ca6399d67..d6998b99ad 100644 --- a/internal/tutorial/experiment/torsf/chapter04/torsf.go +++ b/internal/tutorial/experiment/torsf/chapter04/torsf.go @@ -41,7 +41,7 @@ import ( // measurements representations to the OONI data format. // // ```Go - "github.com/ooni/probe-cli/v3/internal/engine/netx/tracex" + "github.com/ooni/probe-cli/v3/internal/tracex" // ``` // diff --git a/internal/tutorial/netxlite/chapter06/README.md b/internal/tutorial/netxlite/chapter06/README.md index bde30e165c..bd06c31fe6 100644 --- a/internal/tutorial/netxlite/chapter06/README.md +++ b/internal/tutorial/netxlite/chapter06/README.md @@ -53,7 +53,7 @@ creating a system resolver, except that we also need to specify the UDP endpoint address at which the server is listening. ```Go - reso := netxlite.NewResolverUDP(log.Log, dialer, *serverAddr) + reso := netxlite.NewParallelResolverUDP(log.Log, dialer, *serverAddr) ``` The API we invoke is the same as in the previous chapter, though,