Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Jun 28, 2024
1 parent 59ee9ab commit 9fdc61f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/design/dd-008-richer-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ of them were available.
In [#1620](https://github.com/ooni/probe-cli/pull/1620), we started to
modify the `./pkg/oonimkall` package to support richer input.

Before this diff, the code was not using a loader for loading inputs
Before this diff, the code was not using a loader for loading targets
for experiments, and the code roughly looked like this:

```Go
Expand Down
15 changes: 3 additions & 12 deletions internal/targetloading/targetloading.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ var dnsCheckDefaultInput = []string{

var stunReachabilityDefaultInput = stuninput.AsnStunReachabilityInput()

// StaticBareInputForExperiment returns the list of strings an
// staticBareInputForExperiment returns the list of strings an
// experiment should use as static input. In case there is no
// static input for this experiment, we return an error.
func StaticBareInputForExperiment(name string) ([]string, error) {
func staticBareInputForExperiment(name string) ([]string, error) {
// Implementation note: we may be called from pkg/oonimkall
// with a non-canonical experiment name, so we need to convert
// the experiment name to be canonical before proceeding.
Expand All @@ -239,7 +239,7 @@ func StaticBareInputForExperiment(name string) ([]string, error) {
// staticInputForExperiment returns the static input for the given experiment
// or an error if there's no static input for the experiment.
func staticInputForExperiment(name string) ([]model.ExperimentTarget, error) {
return stringListToModelExperimentTarget(StaticBareInputForExperiment(name))
return stringListToModelExperimentTarget(staticBareInputForExperiment(name))
}

// loadOrStaticDefault implements the InputOrStaticDefault policy.
Expand Down Expand Up @@ -364,15 +364,6 @@ func (il *Loader) checkIn(
return &reply.Tests, nil
}

// fetchOpenVPNConfig fetches vpn information for the configured providers
func (il *Loader) fetchOpenVPNConfig(ctx context.Context, provider string) (*model.OOAPIVPNProviderConfig, error) {
reply, err := il.Session.FetchOpenVPNConfig(ctx, provider, "XX")
if err != nil {
return nil, err
}
return reply, nil
}

// preventMistakes makes the code more robust with respect to any possible
// integration issue where the backend returns to us URLs that don't
// belong to the category codes we requested.
Expand Down

0 comments on commit 9fdc61f

Please sign in to comment.