| name | run-tests |
| description | Run unit tests and verify code quality for dora-metrics. Use when the user asks to run tests, check coverage, validate changes, or verify a fix. |
Run Tests
Unit Tests
make test
go test ./... -v -race
make unit-test
Single-Package Tests
go test -v ./pkg/monitors/webrca/...
go test -v ./pkg/integrations/...
go test -v ./pkg/auth/...
go test -v -race -count=1 ./pkg/monitors/webrca/...
Lint
Requires golangci-lint installed (go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6).
make lint
golangci-lint run ./path/to/file.go
golangci-lint run --fix ./...
Test Coverage Gaps
The following packages have tests:
pkg/monitors/webrca/ (client, monitor, types, incidents, integration)
pkg/integrations/ (devlake)
pkg/auth/ (token)
pkg/logger/
internal/version/
The following packages currently lack tests:
pkg/monitors/argocd/ (largest package — be cautious modifying)
pkg/storage/
internal/config/
internal/server/
Pre-Commit Hooks
pre-commit install
pre-commit run --all-files