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

ooni / probe-cli / 6460060263
72%

Build:
DEFAULT BRANCH: master
Ran 09 Oct 2023 05:57PM UTC
Jobs 1
Files 515
Run time 11s
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

09 Oct 2023 05:49PM UTC coverage: 79.609% (-2.4%) from 81.999%
6460060263

push

github

web-flow
refactor: go test -short does not use the host network (#1352)

This diff refactors the codebase so that we avoid using the host network
when running `go test -short`. This change is good in general, because
now coverage tells us the amount of code we're covering without
depending on interactions with an existing network, which means these
tests behave in the same way in ~any place.

I expect a coverage drop from this PR, because there's some coverage
made with integration testing (if we consider integration tests the
tests that require the host network interface with uncensored internet
access).

To make this happen, I needed to modify the `quictesting` package (now
moved to toplevel and renamed `testingquic`) such that it attempts to
get a known-to-work-well endpoint for QUIC _only_ when the developer
using the package really needs it, rather than on import. Before doing
this, there were several tests that panicked because `quictesting` could
not figure out which IP address to use when you disable the WiFi or run
inside another netns. Now we only figure this IP address out the first
time a test requires us to give it either the domain or the endpoint
that we should use.

To be sure we continue to honour the promise that `go test -short` does
not use the host network, I needed to refactor the CI such that we
measure coverage inside a new network namespace with only localhost
support. I think this compromise is acceptable, since the original ask
was to avoid flaky network tests (see
https://github.com/ooni/probe/issues/2426).

Because of this change in how we run the coverage checks, I am
tentatively enabling also running all tests for pull requests, otherwise
we don't know if a contribution breaks tests using the network.
Hopefully, we should be fine because we are caching previous runs, so a
bunch of tests should already be cached.

Closes https://github.com/ooni/probe/issues/2426.

While there, enable again some ... (continued)

0 of 26 new or added lines in 1 file covered. (0.0%)

686 existing lines in 39 files now uncovered.

23628 of 29680 relevant lines covered (79.61%)

37.26 hits per line

Jobs
ID Job ID Ran Files Coverage
1 0 - 6460060263.1 09 Oct 2023 05:57PM UTC 0
79.61
GitHub Action Run
Source Files on build 6460060263
Detailed source file information is not available for this build.
  • Back to Repo
  • 2edeafa7 on github
  • Prev Build on master (#6458470760)
  • Next Build on master (#6460745879)
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