Testing

Unit tests, coverage checks, scenario tests, and API changes.

The contribution workflow and Make targets are documented in CONTRIBUTING.md.

Unit tests

Add unit tests to cover all reachable lines, and run make test-examples for the separate examples module.

make test-coverage-diff checks changed-line coverage against DIFF_BASE and fails below DIFF_COVER_MIN (default 90%). CI enforces the same threshold on pull requests.

make ci runs the local checks. CI runs these checks except make check-proto, and also runs the following CI-only checks:

  • make test-race
  • make vuln
  • editorconfig-checker
  • CodeQL

The documentation build runs for changes under docs/.

Scenario tests

Scenario tests run polad built from the source tree against emulated routers in Containerlab. Their topologies are under test/scenario/, separate from but similar to the example labs.

Run them with make test-scenario. make test-scenario-parallel runs four workers; tests that share a topology run on the same worker.

They require Docker, Containerlab, uv, and images for XRd and vJunos. Pola does not distribute these images. Setup and options are documented in test/README.md.

Changing the gRPC API

Edit api/pola/v1/pola.proto, run make proto, and verify that make check-proto passes. CI does not run this check.

Update the gRPC API and pola references in the same pull request.

Last modified November 20, 2026: docs: modernize documentation site (74dd3de)