Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Sep 12, 2023
1 parent a7dbe9a commit e0688d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions internal/mocks/measuringnetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package mocks

import (
"github.com/ooni/probe-cli/v3/internal/model"
tls "gitlab.com/yawning/utls.git"
utls "gitlab.com/yawning/utls.git"
)

// MeasuringNetwork allows mocking [model.MeasuringNetwork].
Expand All @@ -19,7 +19,7 @@ type MeasuringNetwork struct {

MockNewTLSHandshakerStdlib func(logger model.DebugLogger) model.TLSHandshaker

MockNewTLSHandshakerUTLS func(logger model.DebugLogger, id *tls.ClientHelloID) model.TLSHandshaker
MockNewTLSHandshakerUTLS func(logger model.DebugLogger, id *utls.ClientHelloID) model.TLSHandshaker

MockNewUDPListener func() model.UDPListener
}
Expand Down Expand Up @@ -57,7 +57,7 @@ func (mn *MeasuringNetwork) NewTLSHandshakerStdlib(logger model.DebugLogger) mod
}

// NewTLSHandshakerUTLS implements model.MeasuringNetwork.
func (mn *MeasuringNetwork) NewTLSHandshakerUTLS(logger model.DebugLogger, id *tls.ClientHelloID) model.TLSHandshaker {
func (mn *MeasuringNetwork) NewTLSHandshakerUTLS(logger model.DebugLogger, id *utls.ClientHelloID) model.TLSHandshaker {
return mn.MockNewTLSHandshakerUTLS(logger, id)
}

Expand Down
4 changes: 2 additions & 2 deletions internal/mocks/measuringnetwork_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/ooni/probe-cli/v3/internal/model"
tls "gitlab.com/yawning/utls.git"
utls "gitlab.com/yawning/utls.git"
)

func TestMeasuringN(t *testing.T) {
Expand Down Expand Up @@ -89,7 +89,7 @@ func TestMeasuringN(t *testing.T) {
t.Run("MockNewTLSHandshakerUTLS", func(t *testing.T) {
expected := &TLSHandshaker{}
mn := &MeasuringNetwork{
MockNewTLSHandshakerUTLS: func(logger model.DebugLogger, id *tls.ClientHelloID) model.TLSHandshaker {
MockNewTLSHandshakerUTLS: func(logger model.DebugLogger, id *utls.ClientHelloID) model.TLSHandshaker {
return expected
},
}
Expand Down

0 comments on commit e0688d5

Please sign in to comment.