• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ooni / probe-cli / 9398667008
72%

Build:
DEFAULT BRANCH: master
Ran 06 Jun 2024 09:49AM UTC
Jobs 1
Files 559
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Jun 2024 09:43AM UTC coverage: 83.285% (-0.005%) from 83.29%
9398667008

push

github

web-flow
feat: introduce richer input (#1615)

Most of the existing code is designed to move around lists of
`model.OOAPIURLInfo` and measuring such URLs.

The `model.OOAPIURLInfo` type is like:

```Go
// internal/model/ooapi.go

type OOAPIURLInfo struct {
	CategoryCode string
	CountryCode string
	URL string
}
```

This design originally suited Web Connectivity but it's not good enough
for richer input because it does not contain options.

With this diff, we move into the direction of richer input by replacing
`model.OOAPIURLInfo` lists with lists of:

```Go
// internal/model/experiment.go

type ExperimentTarget struct {
	Category() string
	Country() string
	Input() string
}
```

where `*model.OOAPIURLInfo` implements `model.ExperimentTarget` in a
trivial way and where, additionally:

1. the `InputLoader` is modified to load `ExperimentTarget`;

2. the `Experiment` is modify to measure an `ExperimentTarget`.

In addition to applying these changes, this diff also adapts the whole
tree to use `ExperimentTarget` in all places and adds a trivial
constructor to obtain `OOAPIURLInfo` when the category code and the
country code are unknown.

With this diff merged, implementing richer input for real is a matter of
implementing the following changes:

1. the `*registry.Factory` has a new func field, defined by each
experiment, that loads a list of `ExperimentTarget`;

2. we have a library for input loading containing the same code that we
currently use for the input loader;

3. the `InputLoader` is gone and instead we use the factory (or its
`*engine.experimentBuilder` wrapper) for input loading;

4. we modify the `ExperimentArgs` passed to the `ExperimentMeasurer` to
contain an additional field that is the `ExperimentTarget` we want to
measure;

5. each experiment that needs richer input type-casts from the
`ExperimentTarget` interface to the concrete type that the experiment
richer input should have and acc... (continued)

70 of 104 new or added lines in 27 files covered. (67.31%)

2 existing lines in 2 files now uncovered.

27444 of 32952 relevant lines covered (83.28%)

53.43 hits per line

Jobs
ID Job ID Ran Files Coverage
1 0 - 9398667008.1 06 Jun 2024 09:49AM UTC 0
83.28
GitHub Action Run
Source Files on build 9398667008
Detailed source file information is not available for this build.
  • Back to Repo
  • 7f53b45e on github
  • Prev Build on master (#9398282438)
  • Next Build on master (#9399938815)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc