From 7aec07866e402c86f33c9d963037a6ecffa3f0a3 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Wed, 12 Jul 2023 15:04:27 +0200 Subject: [PATCH] fix(riseupvpn): make tests compile without warnings This change lands on top of @cyBerta changes to make sure the tests compile after recent renamings and to avoid warnings. --- internal/experiment/riseupvpn/riseupvpn_test.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/internal/experiment/riseupvpn/riseupvpn_test.go b/internal/experiment/riseupvpn/riseupvpn_test.go index 023303bdf9..7fe666594c 100644 --- a/internal/experiment/riseupvpn/riseupvpn_test.go +++ b/internal/experiment/riseupvpn/riseupvpn_test.go @@ -14,9 +14,8 @@ import ( "github.com/google/go-cmp/cmp" "github.com/ooni/probe-cli/v3/internal/experiment/riseupvpn" "github.com/ooni/probe-cli/v3/internal/experiment/urlgetter" - "github.com/ooni/probe-cli/v3/internal/legacy/mockable" + "github.com/ooni/probe-cli/v3/internal/mocks" "github.com/ooni/probe-cli/v3/internal/model" - "github.com/ooni/probe-cli/v3/internal/model/mocks" "github.com/ooni/probe-cli/v3/internal/netxlite" "github.com/ooni/probe-cli/v3/internal/tracex" ) @@ -696,7 +695,7 @@ func TestMissingTransport(t *testing.T) { } ctx := context.Background() - sess := &mockable.Session{MockableLogger: log.Log} + sess := &mocks.Session{MockLogger: func() model.Logger { return log.Log }} measurement := new(model.Measurement) callbacks := model.NewPrinterCallbacks(log.Log) args := &model.ExperimentArgs{ @@ -1100,9 +1099,7 @@ func runDefaultMockTest(t *testing.T, multiGetter urlgetter.MultiGetter) *model. args := &model.ExperimentArgs{ Callbacks: model.NewPrinterCallbacks(log.Log), Measurement: measurement, - Session: &mockable.Session{ - MockableLogger: log.Log, - }, + Session: &mocks.Session{MockLogger: func() model.Logger { return log.Log }}, } err := measurer.Run(context.Background(), args)