refactor: merge dnsx and errorsx into netxlite (#517)
When preparing a tutorial for netxlite, I figured it is easier to tell people "hey, this is the package you should use for all low-level networking stuff" rather than introducing people to a set of packages working together where some piece of functionality is here and some other piece is there. Part of https://github.com/ooni/probe/issues/1591
This commit is contained in:
@@ -18,7 +18,7 @@ import (
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/legacy/oonidatamodel"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/legacy/oonitemplates"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/model"
|
||||
"github.com/ooni/probe-cli/v3/internal/netxlite/errorsx"
|
||||
"github.com/ooni/probe-cli/v3/internal/netxlite"
|
||||
"github.com/ooni/probe-cli/v3/internal/runtimex"
|
||||
"github.com/ooni/probe-cli/v3/internal/scrubber"
|
||||
)
|
||||
@@ -77,7 +77,7 @@ func (tr *TargetResults) fillSummary() {
|
||||
if len(tr.TCPConnect) < 1 {
|
||||
return
|
||||
}
|
||||
tr.Summary[errorsx.ConnectOperation] = Summary{
|
||||
tr.Summary[netxlite.ConnectOperation] = Summary{
|
||||
Failure: tr.TCPConnect[0].Status.Failure,
|
||||
}
|
||||
switch tr.TargetProtocol {
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/legacy/oonitemplates"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/mockable"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/model"
|
||||
"github.com/ooni/probe-cli/v3/internal/netxlite/errorsx"
|
||||
"github.com/ooni/probe-cli/v3/internal/netxlite"
|
||||
"github.com/ooni/probe-cli/v3/internal/scrubber"
|
||||
)
|
||||
|
||||
@@ -446,7 +446,7 @@ func TestSummary(t *testing.T) {
|
||||
if len(tr.Summary) != 1 {
|
||||
t.Fatal("cannot find expected entry")
|
||||
}
|
||||
if *tr.Summary[errorsx.ConnectOperation].Failure != failure {
|
||||
if *tr.Summary[netxlite.ConnectOperation].Failure != failure {
|
||||
t.Fatal("invalid failure")
|
||||
}
|
||||
})
|
||||
@@ -465,7 +465,7 @@ func TestSummary(t *testing.T) {
|
||||
if len(tr.Summary) != 2 {
|
||||
t.Fatal("cannot find expected entry")
|
||||
}
|
||||
if tr.Summary[errorsx.ConnectOperation].Failure != nil {
|
||||
if tr.Summary[netxlite.ConnectOperation].Failure != nil {
|
||||
t.Fatal("invalid failure")
|
||||
}
|
||||
if *tr.Summary["handshake"].Failure != failure {
|
||||
@@ -489,7 +489,7 @@ func TestSummary(t *testing.T) {
|
||||
if len(tr.Summary) < 1 {
|
||||
t.Fatal("cannot find expected entry")
|
||||
}
|
||||
if tr.Summary[errorsx.ConnectOperation].Failure != nil {
|
||||
if tr.Summary[netxlite.ConnectOperation].Failure != nil {
|
||||
t.Fatal("invalid failure")
|
||||
}
|
||||
if handshake == nil {
|
||||
|
||||
Reference in New Issue
Block a user