Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ainghazal committed Jul 31, 2024
1 parent 8844976 commit 922ded0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion internal/experiment/openvpn/openvpn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestNewExperimentMeasurer(t *testing.T) {
if m.ExperimentName() != "openvpn" {
t.Fatal("invalid ExperimentName")
}
if m.ExperimentVersion() != "0.1.4" {
if m.ExperimentVersion() != "0.1.5" {
t.Fatal("invalid ExperimentVersion")
}
}
Expand Down
4 changes: 2 additions & 2 deletions internal/experiment/openvpn/richerinput.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (tl *targetLoader) Load(ctx context.Context) ([]model.ExperimentTarget, err
}
}

tl.session.Logger().Warn("Error fetching OpenVPN targets from backend")
tl.loader.Logger.Warnf("Error fetching OpenVPN targets from backend")

// Otherwise, attempt to load the static inputs from CLI and files
inputs, err := targetloading.LoadStatic(tl.loader)
Expand All @@ -120,7 +120,7 @@ func (tl *targetLoader) Load(ctx context.Context) ([]model.ExperimentTarget, err
}

func (tl *targetLoader) loadFromDefaultEndpoints() ([]model.ExperimentTarget, error) {
tl.session.Logger().Info("Using default OpenVPN endpoints")
tl.loader.Logger.Warnf("Using default OpenVPN endpoints")
targets := []model.ExperimentTarget{}
if udp, err := defaultOONIOpenVPNTargetUDP(); err == nil {
targets = append(targets,
Expand Down
16 changes: 0 additions & 16 deletions internal/experiment/openvpn/richerinput_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,22 +132,6 @@ func TestTargetLoaderLoad(t *testing.T) {
},
},
},
{
name: "with just options",
options: &Config{
Provider: "riseupvpn",
},
loader: &targetloading.Loader{
ExperimentName: "openvpn",
InputPolicy: model.InputOrQueryBackend,
Logger: model.DiscardLogger,
Session: &mocks.Session{},
StaticInputs: []string{},
SourceFiles: []string{},
},
expectErr: nil,
expectTargets: nil,
},
}

for _, tc := range cases {
Expand Down

0 comments on commit 922ded0

Please sign in to comment.