Coverage: 96.0% overall | Tests: 89 unit tests | Race Conditions: None
# Basic test run
go test -v ./proxy/internal/... ./firewall/internal/...
# With coverage
go test -cover ./...
# With race detection
go test -race -v ./...# Policy engine (91.2% coverage)
go test -v ./proxy/internal/engine/
# Config loader (100% coverage)
go test -v ./proxy/internal/config/
# Hash functions (92.9% coverage)
go test -v ./proxy/internal/audit/hashlined/
# iptables generator (100% coverage)
go test -v ./firewall/internal/compile/iptables/
# SQLite writer
go test -v ./proxy/internal/audit/sqlite/
# Integration tests
go test -tags=integration -v ./integration/...proxy/internal/engine/evaluator_test.go- Policy evaluation logicproxy/internal/config/loader_test.go- YAML policy loadingproxy/internal/audit/hashlined/hash_test.go- Sensitive data hashingproxy/internal/audit/sqlite/writer_test.go- Async audit writerfirewall/internal/compile/iptables/generator_test.go- Firewall rule generation
integration/proxy_integration_test.go- Full proxy flow + auditintegration/firewall_integration_test.go- Firewall policy to rules
| Package | Coverage | Status |
|---|---|---|
engine |
91.2% | ✅ |
config |
100.0% | ✅ |
hashlined |
92.9% | ✅ |
iptables |
100.0% | ✅ |
sqlite |
Ready | ⏳ |
- ✅ Allow/deny decisions
- ✅ Allowlist/denylist enforcement
- ✅ Argument filtering (regex)
- ✅ Domain allowlists (wildcards)
- ✅ Timeout handling
- ✅ Edge cases & invalid input
- ✅ Valid/invalid YAML
- ✅ Default value application
- ✅ Large policies (1000+ entries)
- ✅ Error handling
- ✅ Special characters
- ✅ Sensitive field redaction
- ✅ Hash consistency
- ✅ Case-insensitive matching
- ✅ Collision resistance
- ✅ Rule generation & ordering
- ✅ DNS resolution
- ✅ Error handling
- ✅ IPv4/IPv6 support
- ✅ Batch processing
- ✅ Concurrent writes
- ✅ Flush intervals
- ✅ Data integrity
# Generate coverage file
go test -coverprofile=coverage.out ./...
# View in terminal
go tool cover -func=coverage.out
# Generate HTML report
go tool cover -html=coverage.out -o coverage.htmlSee clawshield-test-report.md for comprehensive test results, recommendations, and analysis.
Last Updated: 2026-02-09