refactor: merge tlsx into netxlite (#403)
Part of https://github.com/ooni/probe/issues/1505
This commit is contained in:
@@ -10,8 +10,8 @@ import (
|
||||
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/model"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/netx"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/netx/tlsx"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/netx/trace"
|
||||
"github.com/ooni/probe-cli/v3/internal/netxlite"
|
||||
)
|
||||
|
||||
// The Configurer job is to construct a Configuration that can
|
||||
@@ -90,7 +90,7 @@ func (c Configurer) NewConfiguration() (Configuration, error) {
|
||||
if c.Config.TLSServerName != "" {
|
||||
configuration.HTTPConfig.TLSConfig.ServerName = c.Config.TLSServerName
|
||||
}
|
||||
err = tlsx.ConfigureTLSVersion(
|
||||
err = netxlite.ConfigureTLSVersion(
|
||||
configuration.HTTPConfig.TLSConfig, c.Config.TLSVersion,
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"github.com/apex/log"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/experiment/urlgetter"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/netx/resolver"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/netx/tlsx"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/netx/trace"
|
||||
"github.com/ooni/probe-cli/v3/internal/netxlite"
|
||||
)
|
||||
|
||||
func TestConfigurerNewConfigurationVanilla(t *testing.T) {
|
||||
@@ -711,7 +711,7 @@ func TestConfigurerNewConfigurationTLSvInvalid(t *testing.T) {
|
||||
Saver: saver,
|
||||
}
|
||||
_, err := configurer.NewConfiguration()
|
||||
if !errors.Is(err, tlsx.ErrInvalidTLSVersion) {
|
||||
if !errors.Is(err, netxlite.ErrInvalidTLSVersion) {
|
||||
t.Fatalf("not the error we expected: %+v", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user