refactor: rename i/e/n/mockablex => i/netxmocks (#397)

Needed to more easily do https://github.com/ooni/probe/issues/1505
This commit is contained in:
Simone Basso 2021-06-23 16:06:02 +02:00 committed by GitHub
commit 16aa8e5538
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 44 additions and 44 deletions

View file

@ -8,12 +8,12 @@ import (
"testing"
"github.com/ooni/probe-cli/v3/internal/engine/netx/errorx"
"github.com/ooni/probe-cli/v3/internal/engine/netx/mockablex"
"github.com/ooni/probe-cli/v3/internal/netxmocks"
)
func TestErrorWrapperFailure(t *testing.T) {
ctx := context.Background()
d := &errorWrapperDialer{Dialer: mockablex.Dialer{
d := &errorWrapperDialer{Dialer: netxmocks.Dialer{
MockDialContext: func(ctx context.Context, network string, address string) (net.Conn, error) {
return nil, io.EOF
},
@ -43,9 +43,9 @@ func errorWrapperCheckErr(t *testing.T, err error, op string) {
func TestErrorWrapperSuccess(t *testing.T) {
ctx := context.Background()
d := &errorWrapperDialer{Dialer: mockablex.Dialer{
d := &errorWrapperDialer{Dialer: netxmocks.Dialer{
MockDialContext: func(ctx context.Context, network string, address string) (net.Conn, error) {
return &mockablex.Conn{
return &netxmocks.Conn{
MockRead: func(b []byte) (int, error) {
return 0, io.EOF
},