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:
parent
8a0beee808
commit
16aa8e5538
16 changed files with 44 additions and 44 deletions
|
|
@ -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
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue