Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/swarm-ci-metrics
Repository files (latest commit first)
Filename Latest commit message Latest commit date
maia e88de09d72 swarm-ci-metrics: move the settings and pass logic out of main and test it
main read the environment inline and held the per-repo pass, the
certificate gauges and the verdict, so none of it could run in a test.
Each is now a function with its inputs as arguments:

- Env::read takes a lookup closure in place of std::env (same read
  order), var names a missing setting by its full variable.
- finish, skip_counts, wanted_repo, walk_done, trimmed and cert_gauges
  hold the branches that were inline.
- A pass talks to the forge, the identity provider and the collector
  through a Remote trait. Live is the daemon's HTTP implementation, and
  the tests' stand-in answers from memory, so no test opens a socket.
- post_request builds the collector request and refused the refusal
  text, so both are tested without a connection.

x509-cert becomes a dev-dependency (the workspace already pins it) for
the test certificate. Behaviour is the same.

Refs #6811
2026-11-23 22:36:45 +01:00
..
src swarm-ci-metrics: move the settings and pass logic out of main and test it 2026-11-23 22:36:45 +01:00
Cargo.toml swarm-ci-metrics: move the settings and pass logic out of main and test it 2026-11-23 22:36:45 +01:00