This repository hosts:
- Official and community-made assertions on active monitoring
- Samples for running tests
The templates/ directory contains reusable Rice script templates organized per folder.
templates/
├── bundle.json # Generated bundle of all templates
├── schema.json # Manifest JSON schema
└── {template-name}/
└── manifest.yml # Template metadata + embedded Rice script
Each template folder contains a manifest.yml (YAML) defining the template name, description, display order, and the Rice script embedded directly under script:.
Bundle all templates into a single bundle.json with checksums:
go run ./tools/bundle_templates.go
The test-samples/ directory contains mock check results used to validate check scripts.
test-samples/
├── bundle.json # Auto-generated bundle of all samples (inlined metadata + payload)
├── index.json # Auto-generated index of all samples
└── src/{protocol}/ # Sample files organized by protocol (http, https, mcp, tcp, tls, minecraft)
├── {sample}.json # Metadata (check result payload)
└── {sample}.txt # Payload (request debug dump)
Scan all sample files and regenerate index.json:
go run ./tools/index_test_samples.go
Bundle all samples into a single self-contained bundle.json, embedding each sample's metadata and payload inline as Base64:
go run ./tools/bundle_test_samples.go
The template-testing/ directory contains the test runner that validates every template against all test samples.
template-testing/
├── eat.rice # Test script template — uses `#{{__script__}}` placeholder injected at runtime
├── main.go # Minimal entry point
└── main_test.go # Test runner — executes eat.rice + each template script against all indexed samples
main_test.go loads templates/bundle.json and test-samples/index.json, then for each template injects its script into the eat.rice template (replacing the #{{__script__}} placeholder) and executes the combined script against every test sample.
Execute the Rice test script against every sample:
go test ./template-testing/... -v