refactor: move i/e/n/errorx to i/errorsx (#416)
Still working towards https://github.com/ooni/probe/issues/1505
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/experiment/urlgetter"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/model"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/netx/errorx"
|
||||
"github.com/ooni/probe-cli/v3/internal/errorsx"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -111,7 +111,7 @@ func (tk *TestKeys) ComputeEndpointStatus(v urlgetter.MultiOutput, dns, tcp **bo
|
||||
// start where all is unknown
|
||||
*dns, *tcp = nil, nil
|
||||
// process DNS first
|
||||
if v.TestKeys.FailedOperation != nil && *v.TestKeys.FailedOperation == errorx.ResolveOperation {
|
||||
if v.TestKeys.FailedOperation != nil && *v.TestKeys.FailedOperation == errorsx.ResolveOperation {
|
||||
tk.FacebookDNSBlocking = &trueValue
|
||||
*dns = &falseValue
|
||||
return // we know that the DNS has failed
|
||||
@@ -127,7 +127,7 @@ func (tk *TestKeys) ComputeEndpointStatus(v urlgetter.MultiOutput, dns, tcp **bo
|
||||
}
|
||||
*dns = &trueValue
|
||||
// now process connect
|
||||
if v.TestKeys.FailedOperation != nil && *v.TestKeys.FailedOperation == errorx.ConnectOperation {
|
||||
if v.TestKeys.FailedOperation != nil && *v.TestKeys.FailedOperation == errorsx.ConnectOperation {
|
||||
tk.FacebookTCPBlocking = &trueValue
|
||||
*tcp = &falseValue
|
||||
return // because connect failed
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"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/engine/netx/archival"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/netx/errorx"
|
||||
"github.com/ooni/probe-cli/v3/internal/errorsx"
|
||||
)
|
||||
|
||||
func TestNewExperimentMeasurer(t *testing.T) {
|
||||
@@ -162,7 +162,7 @@ func TestWithCancelledContext(t *testing.T) {
|
||||
|
||||
func TestComputeEndpointStatsTCPBlocking(t *testing.T) {
|
||||
failure := io.EOF.Error()
|
||||
operation := errorx.ConnectOperation
|
||||
operation := errorsx.ConnectOperation
|
||||
tk := fbmessenger.TestKeys{}
|
||||
tk.Update(urlgetter.MultiOutput{
|
||||
Input: urlgetter.MultiInput{Target: fbmessenger.ServiceEdge},
|
||||
@@ -192,7 +192,7 @@ func TestComputeEndpointStatsTCPBlocking(t *testing.T) {
|
||||
|
||||
func TestComputeEndpointStatsDNSIsLying(t *testing.T) {
|
||||
failure := io.EOF.Error()
|
||||
operation := errorx.ConnectOperation
|
||||
operation := errorsx.ConnectOperation
|
||||
tk := fbmessenger.TestKeys{}
|
||||
tk.Update(urlgetter.MultiOutput{
|
||||
Input: urlgetter.MultiInput{Target: fbmessenger.ServiceEdge},
|
||||
|
||||
Reference in New Issue
Block a user