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

ooni / probe-cli / 8924545223
72%

Build:
DEFAULT BRANCH: master
Ran 02 May 2024 01:23PM UTC
Jobs 1
Files 556
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

02 May 2024 01:17PM UTC coverage: 83.268% (-0.03%) from 83.299%
8924545223

push

github

web-flow
refactor(webconnectivity*): don't call httpapi directly (#1582)

The https://github.com/ooni/probe-cli/pull/1581 pull request missed that
adding a `CallWebConnectivityTestHelper` method to `*engine.Session`
means we need to mock such a method in `webconnectivityqa`.

I could have mocked the method, but I was not super happy about doing
this, because I would rather have wanted to add more QA tests inside of
`webconnectivityqa` making sure we're indeed falling back when using
test helpers. (We have unit tests testing that, but it would be nice to
have integration tests, so we could observe the overall code behavior.)

My initial approach for allowing this was to create a
`CallWebConnectivityTestHelper` function inside the engine, taking a
`model.ExperimentSession` as its fourth argument and then modifying the
`CallWebConnectivityTestHelper` method to just invoke the function
passing to it the session. However, this approach created import cycles
in tests.

To avoid import cycles, I moved the `CallWebConnectivityTestHelper`
function to `webconnectivityalgo` and modified the mocks inside
`webconnectivityqa` to call such a function. This is where I paused and
realized that the cleanest solution is actually to just always call the
`CallWebConnectivityTestHelper` function in `webconnectivityalgo` and
undo part of the changes in https://github.com/ooni/probe-cli/pull/1581
to avoid having a `CallWebConnectivityTestHelper` method inside of
`model.ExperimentSession`. And so I also implemented this change.

All of this leads us to the current diff, which is part of
https://github.com/ooni/probe/issues/2725.

24 of 24 new or added lines in 3 files covered. (100.0%)

8 existing lines in 1 file now uncovered.

27017 of 32446 relevant lines covered (83.27%)

52.81 hits per line

Jobs
ID Job ID Ran Files Coverage
1 0 - 8924545223.1 02 May 2024 01:23PM UTC 0
83.27
GitHub Action Run
Source Files on build 8924545223
Detailed source file information is not available for this build.
  • Back to Repo
  • cc252040 on github
  • Prev Build on master (#8923980334)
  • Next Build on master (#8924802904)
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